|
Rapicorn - Experimental UI Toolkit - Source Code 10.08.1
|
00001 /* --- Generated by PLIC-CxxStub --- */ 00002 #ifndef __RAPICORN_INTERFACE_HH_ 00003 #define __RAPICORN_INTERFACE_HH_ 00004 00005 // includes: 00006 #include <ui/utilities.hh> 00007 namespace Rapicorn { 00008 class ItemImpl; 00009 class WindowImpl; 00010 } 00011 00012 // --- ServerHH 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 AnySeqImpl : public std::vector<Plic::Any> { 00023 typedef std::vector<Plic::Any> Sequence; 00024 reference append_back(); 00025 }; 00026 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const AnySeqImpl&); 00027 Plic::FieldReader& operator>> (Plic::FieldReader&, AnySeqImpl&); 00030 typedef AnySeqImpl AnySeq; 00031 00032 struct AnySeqSeqImpl : public std::vector<AnySeqImpl> { 00033 typedef std::vector<AnySeqImpl> Sequence; 00034 reference append_back(); 00035 }; 00036 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const AnySeqSeqImpl&); 00037 Plic::FieldReader& operator>> (Plic::FieldReader&, AnySeqSeqImpl&); 00040 typedef AnySeqSeqImpl AnySeqSeq; 00041 00042 struct StringListImpl : public std::vector<std::string> { 00043 typedef std::vector<std::string> Sequence; 00044 reference append_back(); 00045 // class_scope:StringList: 00046 /*Con*/ StringListImpl () {} 00047 /*Con*/ StringListImpl (const std::vector<String> &strv) : Sequence (strv) {} 00048 }; 00049 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const StringListImpl&); 00050 Plic::FieldReader& operator>> (Plic::FieldReader&, StringListImpl&); 00053 typedef StringListImpl StringList; 00054 00055 class ListModelIface : public virtual BaseObject 00057 { 00058 protected: 00059 explicit ListModelIface (); 00060 virtual /*Des*/ ~ListModelIface () = 0; 00061 public: 00062 virtual void _list_types (Plic::TypeHashList&) const; 00063 typedef Rapicorn::Signals::Signal<ListModelIface, void (int first, int last)> Signal_inserted; 00064 typedef Rapicorn::Signals::Signal<ListModelIface, void (int first, int last)> Signal_changed; 00065 typedef Rapicorn::Signals::Signal<ListModelIface, void (int first, int last)> Signal_removed; 00066 Signal_inserted sig_inserted; 00067 Signal_changed sig_changed; 00068 Signal_removed sig_removed; 00069 virtual int size () = 0; 00070 virtual int columns () = 0; 00071 virtual AnySeqImpl row (int n) = 0; 00072 }; 00073 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ListModelIface&); 00074 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ListModelIface*); 00075 Plic::FieldReader& operator>> (Plic::FieldReader&, ListModelIface*&); 00078 // typedef ListModelIface ListModel; ///< Convenience alias for the IDL type ListModel. 00079 00080 class ListModelRelayIface : public virtual BaseObject 00082 { 00083 protected: 00084 explicit ListModelRelayIface (); 00085 virtual /*Des*/ ~ListModelRelayIface () = 0; 00086 public: 00087 virtual void _list_types (Plic::TypeHashList&) const; 00088 typedef Rapicorn::Signals::Signal<ListModelRelayIface, void (int first, int last)> Signal_refill; 00089 Signal_refill sig_refill; 00090 virtual void resize (int size) = 0; 00091 virtual void inserted (int first, 00092 int last = 0) = 0; 00093 virtual void changed (int first, 00094 int last = 0) = 0; 00095 virtual void removed (int first, 00096 int last = 0) = 0; 00097 virtual void fill (int first, 00098 const AnySeqSeqImpl &ss) = 0; 00099 virtual ListModelIface* model () = 0; 00100 }; 00101 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ListModelRelayIface&); 00102 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ListModelRelayIface*); 00103 Plic::FieldReader& operator>> (Plic::FieldReader&, ListModelRelayIface*&); 00106 // typedef ListModelRelayIface ListModelRelay; ///< Convenience alias for the IDL type ListModelRelay. 00107 00108 struct RequisitionImpl { 00109 double width; 00110 double height; 00111 inline RequisitionImpl () { width = 0; height = 0; } 00112 // class_scope:Requisition: 00113 inline RequisitionImpl (double w, double h) : width (w), height (h) {} 00114 }; 00115 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const RequisitionImpl&); 00116 Plic::FieldReader& operator>> (Plic::FieldReader&, RequisitionImpl&); 00119 typedef RequisitionImpl Requisition; 00120 00121 class ItemIface; 00122 00123 struct ItemSeqImpl : public std::vector<ItemIface*> { 00124 typedef std::vector<ItemIface*> Sequence; 00125 reference append_back(); 00126 }; 00127 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const ItemSeqImpl&); 00128 Plic::FieldReader& operator>> (Plic::FieldReader&, ItemSeqImpl&); 00131 typedef ItemSeqImpl ItemSeq; 00132 00133 class ItemIface : public virtual BaseObject 00135 { 00136 protected: 00137 explicit ItemIface (); 00138 virtual /*Des*/ ~ItemIface () = 0; 00139 public: 00140 virtual void _list_types (Plic::TypeHashList&) const; 00141 virtual std::string name () const = 0; 00142 virtual void name (const std::string&) = 0; 00143 virtual ItemIface* unique_component (const std::string &path) = 0; 00144 virtual ItemSeqImpl collect_components (const std::string &path) = 0; 00145 virtual std::string test_dump () = 0; 00146 // class_scope:Item: 00147 ItemImpl& impl (); 00148 const ItemImpl& impl () const; 00149 }; 00150 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ItemIface&); 00151 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ItemIface*); 00152 Plic::FieldReader& operator>> (Plic::FieldReader&, ItemIface*&); 00155 // typedef ItemIface Item; ///< Convenience alias for the IDL type Item. 00156 00157 class ContainerIface : public virtual ItemIface 00159 { 00160 protected: 00161 explicit ContainerIface (); 00162 virtual /*Des*/ ~ContainerIface () = 0; 00163 public: 00164 virtual void _list_types (Plic::TypeHashList&) const; 00165 virtual ItemIface* create_child (const std::string &item_identifier, 00166 const StringListImpl &args = StringListImpl()) = 0; 00167 }; 00168 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ContainerIface&); 00169 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ContainerIface*); 00170 Plic::FieldReader& operator>> (Plic::FieldReader&, ContainerIface*&); 00173 // typedef ContainerIface Container; ///< Convenience alias for the IDL type Container. 00174 00175 class ButtonAreaIface : public virtual ContainerIface 00177 { 00178 protected: 00179 explicit ButtonAreaIface (); 00180 virtual /*Des*/ ~ButtonAreaIface () = 0; 00181 public: 00182 virtual void _list_types (Plic::TypeHashList&) const; 00183 virtual std::string on_click () const = 0; 00184 virtual void on_click (const std::string&) = 0; 00185 virtual std::string on_click2 () const = 0; 00186 virtual void on_click2 (const std::string&) = 0; 00187 virtual std::string on_click3 () const = 0; 00188 virtual void on_click3 (const std::string&) = 0; 00189 }; 00190 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ButtonAreaIface&); 00191 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ButtonAreaIface*); 00192 Plic::FieldReader& operator>> (Plic::FieldReader&, ButtonAreaIface*&); 00195 // typedef ButtonAreaIface ButtonArea; ///< Convenience alias for the IDL type ButtonArea. 00196 00197 struct PixelsImpl : public std::vector<int> { 00198 typedef std::vector<int> Sequence; 00199 reference append_back(); 00200 }; 00201 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const PixelsImpl&); 00202 Plic::FieldReader& operator>> (Plic::FieldReader&, PixelsImpl&); 00205 typedef PixelsImpl Pixels; 00206 00207 struct PixelRectImpl { 00208 int x; 00209 int y; 00210 int width; 00211 int height; 00212 int rowstride; 00213 int offset; 00214 std::string comment; 00215 PixelsImpl argb_pixels; 00216 inline PixelRectImpl () { x = 0; y = 0; width = 0; height = 0; rowstride = 0; offset = 0; } 00217 }; 00218 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const PixelRectImpl&); 00219 Plic::FieldReader& operator>> (Plic::FieldReader&, PixelRectImpl&); 00222 typedef PixelRectImpl PixelRect; 00223 00224 class DrawableIface : public virtual ItemIface 00226 { 00227 protected: 00228 explicit DrawableIface (); 00229 virtual /*Des*/ ~DrawableIface () = 0; 00230 public: 00231 virtual void _list_types (Plic::TypeHashList&) const; 00232 typedef Rapicorn::Signals::Signal<DrawableIface, void (int x, int y, int w, int h)> Signal_redraw; 00233 Signal_redraw sig_redraw; 00234 virtual void draw_rect (const PixelRectImpl &pixrect) = 0; 00235 }; 00236 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, DrawableIface&); 00237 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, DrawableIface*); 00238 Plic::FieldReader& operator>> (Plic::FieldReader&, DrawableIface*&); 00241 // typedef DrawableIface Drawable; ///< Convenience alias for the IDL type Drawable. 00242 00243 class Wind0wIface : public virtual ContainerIface 00245 { 00246 protected: 00247 explicit Wind0wIface (); 00248 virtual /*Des*/ ~Wind0wIface () = 0; 00249 public: 00250 virtual void _list_types (Plic::TypeHashList&) const; 00251 typedef Rapicorn::Signals::Signal<Wind0wIface, bool (const std::string &cmdname, const StringListImpl &args)> Signal_commands; 00252 typedef Rapicorn::Signals::Signal<Wind0wIface, void ()> Signal_displayed; 00253 Signal_commands sig_commands; 00254 Signal_displayed sig_displayed; 00255 virtual bool viewable () = 0; 00256 virtual void show () = 0; 00257 virtual bool closed () = 0; 00258 virtual void close () = 0; 00259 virtual bool synthesize_click (ItemIface &item, 00260 int button, 00261 double xalign = 0.5, 00262 double yalign = 0.5) = 0; 00263 virtual bool synthesize_enter (double xalign = 0.5, 00264 double yalign = 0.5) = 0; 00265 virtual bool synthesize_leave () = 0; 00266 virtual bool synthesize_delete () = 0; 00267 // class_scope:Wind0w: 00268 WindowImpl& impl (); 00269 const WindowImpl& impl () const; 00270 }; 00271 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, Wind0wIface&); 00272 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, Wind0wIface*); 00273 Plic::FieldReader& operator>> (Plic::FieldReader&, Wind0wIface*&); 00276 // typedef Wind0wIface Wind0w; ///< Convenience alias for the IDL type Wind0w. 00277 00278 struct Wind0wListImpl : public std::vector<Wind0wIface*> { 00279 typedef std::vector<Wind0wIface*> Sequence; 00280 reference append_back(); 00281 }; 00282 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const Wind0wListImpl&); 00283 Plic::FieldReader& operator>> (Plic::FieldReader&, Wind0wListImpl&); 00286 typedef Wind0wListImpl Wind0wList; 00287 00288 class ApplicationIface : public virtual BaseObject 00290 { 00291 protected: 00292 explicit ApplicationIface (); 00293 virtual /*Des*/ ~ApplicationIface () = 0; 00294 public: 00295 virtual void _list_types (Plic::TypeHashList&) const; 00296 typedef Rapicorn::Signals::Signal<ApplicationIface, void ()> Signal_missing_primary; 00297 Signal_missing_primary sig_missing_primary; 00298 virtual std::string auto_path (const std::string &file_name, 00299 const std::string &binary_path, 00300 bool search_vpath = 1) = 0; 00301 virtual StringListImpl auto_load (const std::string &defs_domain, 00302 const std::string &file_name, 00303 const std::string &binary_path, 00304 const std::string &i18n_domain = "") = 0; 00305 virtual bool factory_window (const std::string &factory_definition); 00306 virtual void load_string (const std::string &xml_string, 00307 const std::string &i18n_domain = "") = 0; 00308 virtual Wind0wIface* create_wind0w (const std::string &wind0w_identifier, 00309 const StringListImpl &arguments = StringListImpl(), 00310 const StringListImpl &env_variables = StringListImpl()) = 0; 00311 virtual bool finishable (); 00312 virtual void close (); 00313 virtual Wind0wListImpl list_wind0ws () = 0; 00314 virtual ItemIface* unique_component (const std::string &path) = 0; 00315 virtual ItemSeqImpl collect_components (const std::string &path) = 0; 00316 virtual ListModelRelayIface* create_list_model_relay (int n_columns, 00317 const std::string &name = "") = 0; 00318 virtual void test_counter_set (int val) = 0; 00319 virtual void test_counter_add (int val) = 0; 00320 virtual int test_counter_get () = 0; 00321 virtual int test_counter_inc_fetch () = 0; 00322 // class_scope:Application: 00323 static void pixstream (const String &pix_name, const uint8 *static_const_pixstream); 00324 static bool plor_add (ItemIface &item, const String &plor_name); 00325 static ItemIface* plor_remove (const String &plor_name); 00326 /* global mutex */ 00327 struct ApplicationMutex { 00328 static void lock () { rapicorn_thread_enter (); } 00329 static bool trylock () { return rapicorn_thread_try_enter (); } 00330 static void unlock () { rapicorn_thread_leave (); } 00331 }; 00332 static ApplicationMutex mutex; // singleton 00333 /* singleton defs */ 00334 protected: 00335 int m_tc; // FIXME: uninitialized 00336 }; 00337 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ApplicationIface&); 00338 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, ApplicationIface*); 00339 Plic::FieldReader& operator>> (Plic::FieldReader&, ApplicationIface*&); 00342 // typedef ApplicationIface Application; ///< Convenience alias for the IDL type Application. 00343 00344 enum TestEnum { 00345 TEST_ENUM_VALUE1 = 1, 00346 TEST_ENUM_VALUE2 = 2, 00347 TEST_ENUM_VALUE3 = 3, 00348 }; 00349 inline Plic::FieldBuffer& operator<< (Plic::FieldBuffer &fb, TestEnum &e) { fb << Plic::EnumValue (e); return fb; } 00350 inline Plic::FieldReader& operator>> (Plic::FieldReader &frr, TestEnum &e) { e = TestEnum (frr.pop_evalue()); return frr; } 00351 00352 class IdlTestItemIface : public virtual ItemIface 00354 { 00355 protected: 00356 explicit IdlTestItemIface (); 00357 virtual /*Des*/ ~IdlTestItemIface () = 0; 00358 public: 00359 virtual void _list_types (Plic::TypeHashList&) const; 00360 virtual bool bool_prop () const = 0; 00361 virtual void bool_prop (bool) = 0; 00362 virtual int int_prop () const = 0; 00363 virtual void int_prop (int) = 0; 00364 virtual double float_prop () const = 0; 00365 virtual void float_prop (double) = 0; 00366 virtual std::string string_prop () const = 0; 00367 virtual void string_prop (const std::string&) = 0; 00368 virtual TestEnum enum_prop () const = 0; 00369 virtual void enum_prop (TestEnum) = 0; 00370 virtual RequisitionImpl record_prop () const = 0; 00371 virtual void record_prop (const RequisitionImpl&) = 0; 00372 virtual StringListImpl sequence_prop () const = 0; 00373 virtual void sequence_prop (const StringListImpl&) = 0; 00374 virtual IdlTestItemIface* self_prop () const = 0; 00375 virtual void self_prop (IdlTestItemIface*) = 0; 00376 }; 00377 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, IdlTestItemIface&); 00378 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, IdlTestItemIface*); 00379 Plic::FieldReader& operator>> (Plic::FieldReader&, IdlTestItemIface*&); 00382 // typedef IdlTestItemIface IdlTestItem; ///< Convenience alias for the IDL type IdlTestItem. 00383 } // Rapicorn 00384 00385 #endif /* __RAPICORN_INTERFACE_HH_ */
1.7.4