Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 | 87 |
| 88 \var DisplayModes, | 88 \var DisplayModes, |
| 89 \li DISPLAY_MODE_DEFAULT | 89 \li DISPLAY_MODE_DEFAULT |
| 90 %] | 90 %] |
| 91 enum DisplayModes { | 91 enum DisplayModes { |
| 92 DISPLAY_MODE_DEFAULT | 92 DISPLAY_MODE_DEFAULT |
| 93 }; | 93 }; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 %[ | 96 %[ |
| 97 The ClientInfo is used to get information about the client. | |
| 98 %] | |
| 99 [binding_model=by_value, include="core/cross/client_info.h", nocpp, glue_iface] | |
| 100 class ClientInfo { | |
| 101 %[ | |
| 102 The number of objects the client is currently tracking. | |
| 103 %] | |
| 104 [getter] int num_objects; | |
| 105 | |
| 106 %[ | |
| 107 The amount of texture memory used. | |
| 108 %] | |
| 109 [getter] int texture_memory_used; | |
| 110 | |
| 111 %[ | |
| 112 The amount of texture memory used. | |
| 113 %] | |
| 114 [getter] int buffer_memory_used; | |
| 115 | |
| 116 %[ | |
| 117 Whether or not we are using the software renderer. | |
| 118 %] | |
| 119 [getter] bool software_renderer; | |
| 120 }; | |
| 121 | |
| 122 %[ | |
| 97 The Client class is the main point of entry to O3D. It defines methods | 123 The Client class is the main point of entry to O3D. It defines methods |
| 98 for creating and deleting packs. Each new object created by the Client is | 124 for creating and deleting packs. Each new object created by the Client is |
| 99 assigned a unique ID. | 125 assigned a unique ID. |
| 100 | 126 |
| 101 The Client has a root transform for the transform graph and a root render | 127 The Client has a root transform for the transform graph and a root render |
| 102 node for the render graph. | 128 node for the render graph. |
| 103 %] | 129 %] |
| 104 [binding_model=by_pointer, include="core/cross/client.h", | 130 [binding_model=by_pointer, include="core/cross/client.h", |
| 105 nocpp, glue_iface] | 131 nocpp, glue_iface] |
| 106 class Client { | 132 class Client { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 229 void ClearFullscreenClickRegion(); | 255 void ClearFullscreenClickRegion(); |
| 230 %[ | 256 %[ |
| 231 Cancels full-screen display, reverting to displaying content only in the | 257 Cancels full-screen display, reverting to displaying content only in the |
| 232 plugin region. If the plugin is already not in full-screen mode, this has | 258 plugin region. If the plugin is already not in full-screen mode, this has |
| 233 no effect. This does not deactivate the plugin click region--if the user | 259 no effect. This does not deactivate the plugin click region--if the user |
| 234 clicks there again, we'll go back to full-screen display. | 260 clicks there again, we'll go back to full-screen display. |
| 235 %] | 261 %] |
| 236 [userglue, plugin_data] void CancelFullscreenDisplay(); | 262 [userglue, plugin_data] void CancelFullscreenDisplay(); |
| 237 | 263 |
| 238 %[ | 264 %[ |
| 265 Gets info about the client. | |
| 266 %] | |
| 267 [userglue_getter, getter, plugin_data] | |
| 268 ClientInfo client_info; | |
| 269 | |
| 270 %[ | |
| 239 Whether content is displayed in full-screen mode or in a plugin window. The | 271 Whether content is displayed in full-screen mode or in a plugin window. The |
| 240 default is false [not full-screen]. | 272 default is false [not full-screen]. |
| 241 %] | 273 %] |
| 242 [userglue_getter, getter, plugin_data] | 274 [userglue_getter, getter, plugin_data] |
| 243 bool fullscreen; | 275 bool fullscreen; |
| 244 | 276 |
| 245 %[ | 277 %[ |
| 246 Returns the width of the current drawing area [plugin or full-screen] in | 278 Returns the width of the current drawing area [plugin or full-screen] in |
| 247 pixels. | 279 pixels. |
| 248 %] | 280 %] |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 519 | 551 |
| 520 [verbatim=cpp_glue] %{ | 552 [verbatim=cpp_glue] %{ |
| 521 o3d::String userglue_getter_last_error_( | 553 o3d::String userglue_getter_last_error_( |
| 522 o3d::Client* self) { | 554 o3d::Client* self) { |
| 523 return self->GetLastError(); | 555 return self->GetLastError(); |
| 524 } | 556 } |
| 525 o3d::ObjectBaseArray userglue_getter_objects_( | 557 o3d::ObjectBaseArray userglue_getter_objects_( |
| 526 o3d::Client* self) { | 558 o3d::Client* self) { |
| 527 return self->GetByClass<o3d::ObjectBase>(); | 559 return self->GetByClass<o3d::ObjectBase>(); |
| 528 } | 560 } |
| 561 o3d::ClientInfo userglue_getter_client_info( | |
| 562 void *plugin_data, o3d::Client *self) { | |
| 563 glue::_o3d::PluginObject *plugin = | |
| 564 static_cast<glue::_o3d::PluginObject*>(plugin_data); | |
| 565 o3d::ServiceDependency<o3d::ClientInfoManager> | |
|
apatrick
2009/07/09 18:22:00
GetService
| |
| 566 client_info_manager(plugin->service_locator()); | |
| 567 return client_info_manager->client_info(); | |
| 568 } | |
| 529 std::vector<o3d::DisplayMode> userglue_method_GetDisplayModes( | 569 std::vector<o3d::DisplayMode> userglue_method_GetDisplayModes( |
| 530 void *plugin_data, o3d::Client *self) { | 570 void *plugin_data, o3d::Client *self) { |
| 531 std::vector<o3d::DisplayMode> modes; | 571 std::vector<o3d::DisplayMode> modes; |
| 532 static_cast<glue::_o3d::PluginObject*>(plugin_data)->GetDisplayModes( | 572 static_cast<glue::_o3d::PluginObject*>(plugin_data)->GetDisplayModes( |
| 533 &modes); | 573 &modes); |
| 534 return modes; | 574 return modes; |
| 535 } | 575 } |
| 536 void userglue_method_SetFullscreenClickRegion( | 576 void userglue_method_SetFullscreenClickRegion( |
| 537 void *plugin_data, o3d::Client *self, int x, int y, int width, | 577 void *plugin_data, o3d::Client *self, int x, int y, int width, |
| 538 int height, int mode_id) { | 578 int height, int mode_id) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 586 o3d::Renderer::InitStatus userglue_getter_renderer_init_status( | 626 o3d::Renderer::InitStatus userglue_getter_renderer_init_status( |
| 587 void* plugin_data, o3d::Client*) { | 627 void* plugin_data, o3d::Client*) { |
| 588 return static_cast<glue::_o3d::PluginObject*>( | 628 return static_cast<glue::_o3d::PluginObject*>( |
| 589 plugin_data)->renderer_init_status(); | 629 plugin_data)->renderer_init_status(); |
| 590 } | 630 } |
| 591 %} | 631 %} |
| 592 }; | 632 }; |
| 593 | 633 |
| 594 | 634 |
| 595 } // namespace o3d | 635 } // namespace o3d |
| OLD | NEW |