lua_api.txt 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1. .. contents::
  2. Math
  3. ====
  4. Vector3
  5. -------
  6. **Vector3** (x, y, z) : Vector3
  7. Constructor.
  8. **x** (v) : float
  9. Returns the x value of the vector.
  10. **y** (v) : float
  11. Returns the y value of the vector.
  12. **z** (v) : float
  13. Returns the z value of the vector.
  14. **.x** : float
  15. Returns/assigns the x value of the vector.
  16. **.y** : float
  17. Returns/assigns the y value of the vector.
  18. **.z** : float
  19. Returns/assigns the z value of the vector.
  20. **set_x** (v, x)
  21. Sets the value of the x value of the vector.
  22. **set_y** (v, y)
  23. Sets the value of the y value of the vector.
  24. **set_z** (v, z)
  25. Sets the value of the z value of the vector.
  26. **values** (v) : float, float, float
  27. Returns the x, y and z values of the vector.
  28. **add** (a, b) : Vector3
  29. Adds the vector *a* to *b* and returns the result.
  30. **subtract** (a, b) : Vector3
  31. Subtracts the vector *b* from *a* and returns the result.
  32. **multiply** (a, k) : Vector3
  33. Multiplies the vector *a* by the scalar *k* and returns the result.
  34. **divide** (a, k) : Vector3
  35. Divides the vector *a* by the scalar *k* and returns the result.
  36. **dot** (a, b) : float
  37. Returns the dot product between the vectors *a* and *b*.
  38. **cross** (a, b) : Vector3
  39. Returns the cross product between the vectors *a* and *b*.
  40. **equal** (a, b) : bool
  41. Returns true whether the vectors *a* and *b* are equal.
  42. **length** (a) : float
  43. Returns the lenght of *a*.
  44. **squared_length** (a) : float
  45. Returns the squared length of *a*.
  46. **set_length** (a, len)
  47. Sets the lenght of *a* to *len*.
  48. **normalize** (a) : Vector3
  49. Normalizes *a* and returns the result.
  50. **distance** (a, b) : float
  51. Returns the distance between the points *a* and *b*.
  52. **angle** (a, b) : float
  53. Returns the angle between the vectors *a* and *b*.
  54. Quaternion
  55. ----------
  56. **Quaternion** (v, w) : Quaternion
  57. Constructor.
  58. **negate** (q) : Quaternion
  59. Negates the quaternion *q* and returns the result.
  60. **identity** () : Quaternion
  61. Returns the identity quaternion.
  62. **multiply** (a, b) : Quaternion
  63. Multiplies the quaternions *a* and *b*. (i.e. rotates first by *a* then by *b*).
  64. **multiply_by_scalar** (a, k) : Quaternion
  65. Multiplies the quaternion *a* by the scalar *k*.
  66. **length** (q) : float
  67. Returns the length of *q*.
  68. **conjugate** (q) : Quaternion
  69. Returns the conjugate of quaternion *q*.
  70. **inverse** (q) : Quaternion
  71. Returns the inverse of quaternion *q*.
  72. **power** (q, exp) : Quaternion
  73. Returns the quaternion *q* raised to the power of *exp*.
  74. **elements** (q) : x, y, z, w
  75. Returns the elements of the quaternion.
  76. Matrix4x4
  77. ---------
  78. **Matrix4x4** (m0, m1, ..., m15) : Matrix4x4
  79. Constructor.
  80. **from_quaternion** (q) : Matrix4x4
  81. Returns a new matrix from *q*.
  82. **from_translation** (t) : Matrix4x4
  83. Returns a new matrix from *t*.
  84. **from_quaternion_translation** (q, t) : Matrix4x4
  85. Returns a new matrix from *q* and *t*.
  86. **from_axes** (x, y, z, t) : Matrix4x4
  87. Returns a new matrix from *x*, *y*, *z* and *t*.
  88. **add** (a, b) : Matrix4x4
  89. Adds the matrix *a* to *b* and returns the result.
  90. **subtract** (a, b) : Matrix4x4
  91. Subtracts the matrix *b* from *a* and returns the result.
  92. **multiply** (a, b) : Matrix4x4
  93. Multiplies the matrix *a* by *b* and returns the result. (i.e. transforms first by *b* then by *a*)
  94. **transpose** (m) : Matrix4x4
  95. Transposes the matrix *m* and returns the result.
  96. **determinant** (m) : float
  97. Returns the determinant of the matrix *m*.
  98. **invert** (m) : Matrix4x4
  99. Inverts the matrix *m* and returns the result.
  100. **x** (m) : Vector3
  101. Returns the x asis of the matrix *m*.
  102. **y** (m) : Vector3
  103. Returns the y asis of the matrix *m*.
  104. **z** (m) : Vector3
  105. Returns the z asis of the matrix *m*.
  106. **set_x** (m, x)
  107. Sets the x axis of the matrix *m*.
  108. **set_y** (m, y)
  109. Sets the y axis of the matrix *m*.
  110. **set_z** (m, z)
  111. Sets the z axis of the matrix *m*.
  112. **translation** (m, a) : Vector3
  113. Returns the translation portion of the matrix *m*.
  114. **set_translation** (m, t)
  115. Sets the translation portion of the matrix *m*.
  116. **identity** ()
  117. Returns the identity matrix.
  118. **to_string** (a)
  119. Returns a string representing the matrix.
  120. Math
  121. ----
  122. **ray_obb_intersection** (from, dir, tm, extents) : float
  123. Returns the distance along ray (from, dir) to intersection point with the oriented
  124. bounding box (tm, extents) or -1.0 if no intersection.
  125. World
  126. =====
  127. **spawn_unit** (world, name, [position, rotation]) : Unit
  128. Spawns a new instance of the unit *name* at the given *position* and *rotation*.
  129. **destroy_unit** (world, unit)
  130. Destroys the given *unit*.
  131. **num_units** (world) : int
  132. Returns the number of units in the *world*.
  133. **units** (world) : Table
  134. Returns all the the units in the world in a table.
  135. **update_animations** (world, dt)
  136. Update all animations with *dt*.
  137. **update_scene** (world, dt)
  138. Updates the scene with *dt*.
  139. **update** (world, dt)
  140. Updates the world with *dt*.
  141. **play_sound** (world, name, [loop, volume, position, range]) : SoundInstanceId
  142. Plays the sound with the given *name* at the given *position*, with the given
  143. *volume* and *range*. *loop* controls whether the sound must loop or not.
  144. **stop_sound** (world, id)
  145. Stops the sound with the given *id*.
  146. **link_sound** (world, id, unit, node)
  147. Links the sound *id* to the *node* of the given *unit*.
  148. After this call, the sound *id* will follow the unit *unit*.
  149. **set_listener_pose** (world, pose)
  150. Sets the *pose* of the listener.
  151. **set_sound_position** (world, position)
  152. Sets the *position* of the sound *id*.
  153. **set_sound_range** (world, range)
  154. Sets the *range* of the sound *id*.
  155. **set_sound_volume** (world, volume)
  156. Sets the *volume* of the sound *id*.
  157. **create_window_gui** (world) : Gui
  158. Creates a new window-space Gui of size *width* and *height*.
  159. **destroy_gui** (world, id)
  160. Destroys the gui with the given *id*.
  161. **create_debug_line** (world, depth_test) : DebugLine
  162. Creates a new DebugLine. *depth_test* controls whether to
  163. enable depth test when rendering the lines.
  164. **destroy_debug_line** (world, line)
  165. Destroys the debug *line*.
  166. **load_level** (world, name) : Level
  167. Loads the level *name* into the world.
  168. **physics_world** (world) : PhysicsWorld
  169. Returns the physics sub-world.
  170. **sound_world** (world) : SoundWorld
  171. Returns the sound sub-world.
  172. Unit
  173. ----
  174. **node** (unit, name)
  175. Returns the node *name*.
  176. **has_node** (unit, name) : int
  177. Returns whether the unit has the node *name*.
  178. **num_nodes** (unit) : int
  179. Returns the number of nodes of the unit.
  180. **local_position** (unit) : Vector3
  181. Returns the local position of the unit.
  182. **local_rotation** (unit) : Quaternion
  183. Returns the local rotation of the unit.
  184. **local_pose** (unit) : Matrix4x4
  185. Returns the local pose of the unit.
  186. **world_position** (unit) : Vector3
  187. Returns the world position of the unit.
  188. **world_rotation** (unit) : Quaternion
  189. Returns the world rotation of the unit.
  190. **world_pose** (unit) : Matrix4x4
  191. Returns the world pose of the unit.
  192. **set_local_position** (unit, position)
  193. Sets the local position of the unit.
  194. **set_local_rotation** (unit, rotation)
  195. Sets the local rotation of the unit.
  196. **set_local_pose** (unit, pose)
  197. Sets the local pose of the unit.
  198. **link_node** (unit)
  199. Links the *child* node to the *parent* node.
  200. After the linking the *child* pose is reset to identity.
  201. Note that *parent* node must be either -1 (meaning no parent), or an index lesser than child.
  202. **unlink_node** (unit, child)
  203. Unlinks *child* from its parent, if any.
  204. **camera** (unit, name)
  205. Returns the camera *name*.
  206. **material** (unit, name)
  207. Returns the material *name*.
  208. **mesh** (unit, name)
  209. Returns the mesh *name*.
  210. **sprite** (unit, name)
  211. Returns the sprite *name*.
  212. **actor** (unit, name)
  213. Returns the actor *name*.
  214. **controller** (unit, name)
  215. Returns the controller *name*.
  216. **is_a** (unit, type)
  217. Returns whether the unit is of the given *type*.
  218. **play_sprite_animation** (unit, name, loop)
  219. Plays the sprite animation *name*.
  220. **stop_sprite_animation** (unit)
  221. Stops the current playing animation.
  222. Camera
  223. ------
  224. **local_position** (camera, position)
  225. Returns the local position of the camera.
  226. **local_rotation** (camera, rotation)
  227. Returns the local rotation of the camera.
  228. **local_pose** (camera, pose)
  229. Returns the local pose of the camera.
  230. **world_position** (camera) : Vector3
  231. Returns the world position of the camera.
  232. **world_rotation** (camera) : Quaternion
  233. Returns the world rotation of the camera.
  234. **world_pose** (camera) : Matrix4x4
  235. Returns the world pose of the camera.
  236. **set_local_position** (camera, unit, position)
  237. Sets the local position of the camera.
  238. **set_local_rotation** (camera, unit, rotation)
  239. Sets the local rotation of the camera.
  240. **set_local_pose** (camera, unit, pose)
  241. Sets the local pose of the camera.
  242. **set_projection_type** (camera, type)
  243. Sets the projection type of the camera.
  244. **projection_type** (camera) : int
  245. Returns the projection type of the camera.
  246. **fov** (camera) : float
  247. Returns the field-of-view of the camera in degrees.
  248. **set_fov** (camera, degrees)
  249. Sets the field-of-view of the camera in degrees.
  250. **aspect** (camera) : float
  251. Returns the aspect ratio of the camera. (Perspective projection only.)
  252. **set_aspect** (camera)
  253. Sets the aspect ratio of the camera. (Perspective projection only.)
  254. **near_clip_distance** (camera) : float
  255. Returns the near clip distance of the camera.
  256. **set_near_clip_distance** (camera, near)
  257. Sets the near clip distance of the camera.
  258. **far_clip_distance** (camera) : float
  259. Returns the far clip distance of the camera.
  260. **set_far_clip_distance** (camera, far)
  261. Sets the far clip distance of the camera.
  262. **set_orthographic_metrics** (camera, left, right, bottom, top)
  263. Sets the coordinates for orthographic clipping planes. (Orthographic projection only.)
  264. **set_viewport_metrics** (camera, x, y, width, height)
  265. Sets the coordinates for the camera viewport in pixels.
  266. **screen_to_world** (camera, pos) : Vector3
  267. Returns *pos* from screen-space to world-space coordinates.
  268. **world_to_screen** (camera, pos) : Vector3
  269. Returns *pos* from world-space to screen-space coordinates.
  270. Sprite
  271. ------
  272. **local_position** (sprite) : Vector3
  273. Returns the local position of the sprite.
  274. **local_rotation** (sprite) : Quaternion
  275. Returns the local rotation of the sprite.
  276. **local_pose** (sprite) : Matrix4x4
  277. Returns the local pose of the sprite.
  278. **set_local_position** (sprite, unit, position)
  279. Sets the local position of the sprite.
  280. **set_local_rotation** (sprite, unit, rotation)
  281. Sets the local rotation of the sprite.
  282. **set_local_pose** (sprite, unit, pose)
  283. Sets the local pose of the sprite.
  284. **set_frame** (sprite, num)
  285. Sets the frame of the sprite.
  286. Mesh
  287. ----
  288. **local_position** (mesh) : Vector3
  289. Returns the local position of the mesh.
  290. **local_rotation** (mesh) : Quaternion
  291. Returns the local rotation of the mesh.
  292. **local_pose** (mesh) : Matrix4x4
  293. Returns the local pose of the mesh.
  294. **set_local_position** (mesh, unit, position)
  295. Sets the local position of the mesh.
  296. **set_local_rotation** (mesh, unit, rotation)
  297. Sets the local rotation of the mesh.
  298. **set_local_pose** (mesh, unit, pose)
  299. Sets the local pose of the mesh.
  300. Material
  301. --------
  302. set_float
  303. TODO
  304. set_vector2
  305. TODO
  306. set_vector3
  307. TODO
  308. Gui
  309. ---
  310. resolution
  311. TODO
  312. move
  313. TODO
  314. screen_to_gui
  315. TODO
  316. draw_rectangle
  317. TODO
  318. draw_image
  319. TODO
  320. draw_image_uv
  321. TODO
  322. draw_text
  323. TODO
  324. Physics World
  325. =============
  326. **gravity** (physics_world) : Vector3
  327. Returns the gravity.
  328. **set_gravity** (physics_world, gravity)
  329. Sets the gravity.
  330. **make_raycast**
  331. TODO
  332. **overlap_test**
  333. TODO
  334. Controller
  335. ----------
  336. **move** (controller, position)
  337. Moves the controller to *position*.
  338. **position** (controller) : Vector3
  339. Returns the position of the controller.
  340. **collides_up** (controller) : bool
  341. Returns whether the contoller collides upwards.
  342. **collides_down** (controller) : bool
  343. Returns whether the controller collides downwards.
  344. **collides_sides** (controller) : bool
  345. Returns whether the controller collides sidewards.
  346. Actor
  347. -----
  348. **world_position** (actor) : Vector3
  349. Returns the world position of the actor.
  350. **world_rotation** (actor) : Quaternion
  351. Returns the world rotation of the actor.
  352. **world_pose** (actor) : Matrix4x4
  353. Returns the world pose of the actor.
  354. **teleport_world_position** (actor, position)
  355. Teleports the actor to the given world position.
  356. **teleport_world_rotation** (actor, rotation)
  357. Teleports the actor to the given world rotation.
  358. **teleport_world_pose** (actor, pose)
  359. Teleports the actor to the given world pose.
  360. **center_of_mass** (actor) : Vector3
  361. Returns the center of mass of the actor.
  362. **enable_gravity** (actor)
  363. Enables gravity for the actor.
  364. **disable_gravity** (actor)
  365. Disables gravity for the actor.
  366. **enable_collision** (actor)
  367. Enables collision detection for the actor.
  368. **disable_collision** (actor)
  369. Disables collision detection for the actor.
  370. **set_collision_filter** (actor, name)
  371. Sets the collision filter of the actor.
  372. **set_kinematic** (actor, kinematic)
  373. Sets whether the actor is kinematic or not.
  374. Note that this call has no effect on static actors.
  375. **move** (actor, position)
  376. Moves the actor to *pos*
  377. Note that this call only affects nonkinematic actors.
  378. **is_static** (actor) : bool
  379. Returns whether the actor is static.
  380. **is_dynamic** (actor) bool
  381. Returns whether the actor is dynamic.
  382. **is_kinematic** (actor) : bool
  383. Returns whether the actor is kinematic (keyframed).
  384. **is_nonkinematic** (actor) : bool
  385. Returns whether the actor is nonkinematic (i.e. dynamic and not kinematic).
  386. **linear_damping** (actor) : float
  387. Returns the linear damping of the actor.
  388. **set_linear_damping** (actor, damping)
  389. Sets the linear damping of the actor.
  390. **angular_damping** (actor) : float
  391. Returns the angular damping of the actor.
  392. **set_angular_damping** (actor, rate)
  393. Sets the angular damping of the actor.
  394. **linear_velocity** (actor) : Vector3
  395. Returns the linear velocity of the actor.
  396. **set_linear_velocity** (actor, velocity)
  397. Sets the linear velocity of the actor.
  398. Note that this call only affects nonkinematic actors.
  399. **angular_velocity** (actor) : Vector3
  400. Returns the angular velocity of the actor.
  401. **set_angular_velocity** (actor, velocity)
  402. Sets the angular velocity of the actor.
  403. Note that this call only affects nonkinematic actors.
  404. **add_impulse** (actor, impulse)
  405. Adds a linear impulse (acting along the center of mass) to the actor.
  406. Note that this call only affects nonkinematic actors.
  407. **add_impulse_at** (actor, impulse, position)
  408. Adds a linear impulse (acting along the world position *pos*) to the actor.
  409. Note that this call only affects nonkinematic actors.
  410. **add_torque_impulse** (actor, impulse)
  411. Adds a torque impulse to the actor.
  412. **push** (actor, velocity, mass)
  413. Pushes the actor as if it was hit by a point object with the given *mass*
  414. travelling at the given *velocity*.
  415. Note that this call only affects nonkinematic actors.
  416. **push_at** (actor, velocity, mass, position)
  417. Like push() but applies the force at the world position *pos*.
  418. Note that this call only affects nonkinematic actors.
  419. **is_sleeping** (actor) : bool
  420. Returns whether the actor is sleeping.
  421. **wake_up** (actor)
  422. Wakes the actor up.
  423. **unit** (actor) : Unit
  424. Returns the unit that owns the actor or nil;
  425. Sound World
  426. ===========
  427. **stop_all** (sound_world)
  428. Stops all the sounds in the world.
  429. **pause_all** (sound_world)
  430. Pauses all the sounds in the world
  431. **resume_all** (sound_world)
  432. Resumes all previously paused sounds in the world.
  433. **is_playing** (sound_world, id) : bool
  434. Returns wheter the sound *id* is playing.
  435. Resource Package
  436. ================
  437. **load** (package)
  438. Loads all the resources in the package.
  439. Note that the resources are not immediately available after the call is made,
  440. instead, you have to poll for completion with has_loaded().
  441. **unload** (package)
  442. Unloads all the resources in the package.
  443. **flush** (package)
  444. Waits until the package has been loaded.
  445. **has_loaded** (package) : bool
  446. Returns whether the package has been loaded.
  447. Device
  448. ======
  449. **platform** () : string
  450. Returns a string identifying what platform the engine is running on.
  451. **architecture** () : string
  452. Returns a string identifying what architecture the engine is running on.
  453. **version** () : string
  454. Returns a string identifying the engine version.
  455. **last_delta_time** () : float
  456. Returns the time in seconds needed to render the last frame
  457. **quit** ()
  458. Quits the application.
  459. **resolution** () : Table
  460. Returns the main window resolution.
  461. **create_world** () : World
  462. Creates a new world.
  463. **destroy_world** (world)
  464. Destroys the given *world*.
  465. **render_world** (world, camera)
  466. Renders the given *world* from the point of view of the given *camera*.
  467. **create_resource_package** (name) : ResourcePackage
  468. Returns the resource package with the given *package_name* name.
  469. **destroy_resource_package** (package)
  470. Destroy a previously created resource *package*.
  471. Note that to unload the resources loaded by the package, you have to call
  472. ResourcePackage.unload() first.
  473. **console_send** (table)
  474. Sends the given lua *table* to clients connected to the engine.
  475. Note that the current version only supports explicitly escaped strings as key/value pairs.
  476. **can_get** (type, name) : bool
  477. Returns whether the resource (type, name) is loaded.
  478. DebugLine
  479. =========
  480. **add_line** (debug_line, start, end, color)
  481. Adds a line from *start* to *end* with the given *color*.
  482. **add_sphere** (debug_line, center, radius, color)
  483. Adds a sphere at *center* with the given *radius* and *color*.
  484. **add_obb** (debug_line, tm, extents, color)
  485. Adds an orientd bounding box. *tm* describes the position and orientation of
  486. the box. *extents* describes the size of the box along the axis.
  487. **clear** (debug_line)
  488. Clears all the lines.
  489. **commit** (debug_line)
  490. Sends the lines to renderer for drawing.
  491. Input
  492. =====
  493. Keyboard
  494. --------
  495. **modifier_pressed** (modifier) : bool
  496. Returns whether the specified *modifier* is pressed.
  497. **button_pressed** (button) : bool
  498. Returns whether the specified *b* button is pressed in the current frame.
  499. **button_released** (button) : bool
  500. Returns whether the specified *b* button is released in the current frame.
  501. **any_pressed** () : bool
  502. Returns wheter any button is pressed in the current frame.
  503. **any_released** () : bool
  504. Returns whether any button is released in the current frame.
  505. Mouse
  506. -----
  507. **button_pressed** (button) : bool
  508. Returns whether the *b* button is pressed in the current frame.
  509. **button_released** (button) : bool
  510. Returns whether the *b* button is released in the current frame.
  511. **any_pressed** () : bool
  512. Returns wheter any button is pressed in the current frame.
  513. **any_released** () : bool
  514. DReturns whether any button is released in the current frame.ef
  515. **cursor_xy** () : Vector2
  516. Returns the position of the cursor in window space.
  517. **set_cursor_xy** (position)
  518. Sets the position of the cursor in window space.
  519. **cursor_relative_xy** () : Vector2
  520. Returns the relative position of the cursor in window space.
  521. **set_cursor_relative_xy** (position)
  522. Sets the relative position of the cursor in window space.
  523. Touch
  524. -----
  525. **pointer_down** (pointer) : bool
  526. Returns whether the *p* pointer is pressed in the current frame.
  527. **pointer_up** (pointer) : bool
  528. Returns whether the *p* pointer is released in the current frame.
  529. **any_down** () : bool
  530. Returns wheter any pointer is pressed in the current frame.
  531. **any_up** () : bool
  532. Returns whether any pointer is released in the current frame.
  533. **pointer_xy** () : Vector2
  534. Returns the position of the pointer *p* in window space.
  535. Window
  536. ======
  537. **show** ()
  538. Shows the window.
  539. **hide** ()
  540. Hides the window.
  541. **resize** (width, height)
  542. Resizes the window to *width* and *height*.
  543. **move** (x, y)
  544. Moves the window to *x* and *y*.
  545. **minimize** ()
  546. Minimizes the window.
  547. **restore** ()
  548. Restores the window.
  549. **is_resizable** () : bool
  550. Returns whether the window is resizable.
  551. **set_resizable** (resizable)
  552. Sets whether the window is resizable.
  553. **title** () : string
  554. Returns the title of the window.
  555. **set_title** (title)
  556. Sets the title of the window.