/[gzz]/gzz/gzz/client/GraphicsAPI.java
ViewVC logotype

Diff of /gzz/gzz/client/GraphicsAPI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by tjl, Wed Sep 4 12:48:09 2002 UTC revision 1.18 by benja, Wed Sep 25 10:56:54 2002 UTC
# Line 49  public abstract class GraphicsAPI { Line 49  public abstract class GraphicsAPI {
49              gfxapi = new gzz.client.awt.AWTAPI();              gfxapi = new gzz.client.awt.AWTAPI();
50          else if(cl.equals("gl"))          else if(cl.equals("gl"))
51              gfxapi = new gzz.client.gl.GLAPI();              gfxapi = new gzz.client.gl.GLAPI();
52          else          else
53              throw new Error("Invalid client type '"+cl+"': should be awt or gl");              throw new Error("Invalid client type '"+cl+"': should be awt or gl");
54      }      }
55    
# Line 65  public abstract class GraphicsAPI { Line 65  public abstract class GraphicsAPI {
65      public abstract void startUpdateManager(Runnable r);      public abstract void startUpdateManager(Runnable r);
66    
67      /** Create a new window.      /** Create a new window.
68         *  @param repr The client-level object representing this window.
69         *              Passed to the binder when an event occurs.
70       */       */
71      public abstract Window createWindow() ;      public abstract Window createWindow(Object repr);
72    
73      /** Obtain a text style object for an abstract font at a given      /** Obtain a text style object for an abstract font at a given
74       * size. The parameters are as       * size. The parameters are as
# Line 100  public abstract class GraphicsAPI { Line 102  public abstract class GraphicsAPI {
102           * size as size.           * size as size.
103           * This vobscene will <b>not</b> contain any instructions           * This vobscene will <b>not</b> contain any instructions
104           * to clear the window etc., since vobscenes can be used as           * to clear the window etc., since vobscenes can be used as
105           * viewports.           * viewports.
106           */           */
107          public VobScene createVobScene() {          public VobScene createVobScene() {
108              return createVobScene(getSize());              return createVobScene(getSize());
# Line 114  public abstract class GraphicsAPI { Line 116  public abstract class GraphicsAPI {
116           */           */
117          abstract public void registerBinder(Binder s);          abstract public void registerBinder(Binder s);
118    
119          /** Add a timeout: Binder.timeout() is called after          /** Add a timeout: Binder.timeout() is called after
120           * given number of milliseconds.           * given number of milliseconds.
121           */           */
122          public void addTimeout(int ms, Object o) {          public void addTimeout(int ms, Object o) {
123              throw new UnsupportedOperationException("Not in this gfxapi");              throw new UnsupportedOperationException("Not in this gfxapi");
124          }          }
125    
126          public Window(GraphicsAPI api) { this.gfxapi = api; }          /** @param repr The object represented by this window (passed to binder)
127             */
128            public Window(GraphicsAPI api, Object repr) {
129                this.gfxapi = api;
130                this.repr = repr;
131            }
132          private final GraphicsAPI gfxapi;          private final GraphicsAPI gfxapi;
133            protected final Object repr;
134    
135          /** Get the GraphicsAPI this window is associated with.          /** Get the GraphicsAPI this window is associated with.
136           */           */

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26