Rapicorn - Experimental UI Toolkit - Source Code 10.08.1
interfaces.idl
Go to the documentation of this file.
00001 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html -*-mode:c++;-*-
00002 
00003 include "hardcoded.idl";
00004 
00005 namespace Rapicorn {
00006 
00010 sequence AnySeq {
00011   any vany;
00012 };
00013 
00017 sequence AnySeqSeq {
00018   AnySeq seq;
00019 };
00020 
00024 sequence StringList {
00025   string strings;
00026 };
00027 
00033 interface ListModel {
00034   int         size     () = 0;                
00035   int         columns  () = 0;                
00036   AnySeq      row      (int n) = 0;           
00037   signal void inserted (int first, int last); 
00038   signal void changed  (int first, int last); 
00039   signal void removed  (int first, int last); 
00040 };
00041 
00047 interface ListModelRelay {
00048   void        resize     (int size) = 0;                
00049   void        inserted   (int first, int last = 0) = 0; 
00050   void        changed    (int first, int last = 0) = 0; 
00051   void        removed    (int first, int last = 0) = 0; 
00052   void        fill       (int first, AnySeqSeq ss) = 0; 
00053   signal void refill     (int first, int last);         
00054   ListModel   model      () = 0; 
00055 };
00056 
00062 record Requisition {
00063   float width;
00064   float height;
00065 };
00066 
00067 interface Item;
00068 
00072 sequence ItemSeq {
00073   Item  items;
00074 };
00075 
00079 interface Item {
00080   Item          unique_component        (string path) = 0;
00081   ItemSeq       collect_components      (string path) = 0;
00082   string        test_dump               () = 0;
00083   string        name = String (_("Name"), _("Identification name of the item"), "rw");
00084 };
00085 
00089 interface Container : Item {
00091   Item          create_child            (string item_identifier,
00092                                          StringList args = 0) = 0;
00093 };
00094 
00100 interface ButtonArea : Container {
00101   string        on_click        = String (_("On CLick"), _("Action to carry out on button1 clicks."), "rw");
00102   string        on_click2       = String (_("On CLick"), _("Action to carry out on button2 clicks."), "rw");
00103   string        on_click3       = String (_("On CLick"), _("Action to carry out on button3 clicks."), "rw");
00104 };
00105 
00106 sequence Pixels {
00107   int pixel;
00108 };
00109 record PixelRect {
00110   int      x;
00111   int     y;
00112   int     width;
00113   int     height;
00114   int     rowstride;
00115   int     offset;
00116   string  comment;
00117   Pixels  argb_pixels;
00118 };
00119 
00123 interface Drawable : Item {
00124   signal void   redraw          (int x, int y, int w, int h);   
00125   void          draw_rect       (PixelRect pixrect) = 0;        
00126 };
00127 
00133 interface Wind0w : Container {
00134   bool          viewable                () = 0;
00135   void          show                    () = 0;
00136   bool          closed                  () = 0;
00137   void          close                   () = 0;
00138   signal bool   commands                (string     cmdname,
00139                                          StringList args);
00140   signal void   displayed               ();
00141   bool          synthesize_click        (Item       item,
00142                                          int        button,
00143                                          float      xalign = 0.5,
00144                                          float      yalign = 0.5) = 0;
00145   bool          synthesize_enter        (float      xalign = 0.5,
00146                                          float      yalign = 0.5) = 0;
00147   bool          synthesize_leave        () = 0;
00148   bool          synthesize_delete       () = 0;
00149 };
00150 
00151 sequence Wind0wList {
00152   Wind0w wind0ws;
00153 };
00154 
00160 interface Application {
00161   /* startup */
00162   string        auto_path       (string         file_name,
00163                                  string         binary_path,
00164                                  bool           search_vpath = true) = 0;
00165   StringList    auto_load       (string         defs_domain,
00166                                  string         file_name,
00167                                  string         binary_path,
00168                                  string         i18n_domain = "") = 0;
00169   bool          factory_window  (string         factory_definition);
00170   void          load_string     (string         xml_string,
00171                                  string         i18n_domain = "") = 0;
00172   /* wind0ws */
00173   Wind0w        create_wind0w   (string         wind0w_identifier,
00174                                  StringList     arguments = 0,
00175                                  StringList     env_variables = 0) = 0;
00176   bool          finishable      ();
00177   signal void   missing_primary ();
00178   void          close           ();
00179   Wind0wList    list_wind0ws            () = 0;
00180   Item          unique_component        (string path) = 0;
00181   ItemSeq       collect_components      (string path) = 0;
00182   // helpers
00183   ListModelRelay create_list_model_relay (int n_columns,
00184                                           string name = "") = 0; 
00185   /* testing */
00186   void          test_counter_set        (int val) = 0;
00187   void          test_counter_add        (int val) = 0;
00188   int           test_counter_get        () = 0;
00189   int           test_counter_inc_fetch  () = 0;
00190 };
00191 
00192 enum TestEnum {
00193   TEST_ENUM_VALUE1,
00194   TEST_ENUM_VALUE2,
00195   TEST_ENUM_VALUE3,
00196 };
00197 
00198 interface IdlTestItem : Item {
00199   bool           bool_prop;
00200   int            int_prop;
00201   float          float_prop;
00202   string         string_prop;
00203   TestEnum       enum_prop;
00204   Requisition    record_prop;
00205   StringList     sequence_prop;
00206   IdlTestItem    self_prop;
00207 };
00208 
00209 } // Rapicorn
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines