AtomicWork.d.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /// <reference path="Atomic.d.ts" />
  2. /// <reference path="ToolCore.d.ts" />
  3. /// <reference path="Editor.d.ts" />
  4. declare module Atomic {
  5. export interface PathInfo {
  6. pathName: string;
  7. fileName: string;
  8. ext: string;
  9. }
  10. /*
  11. export enum UIWidgetEventType {
  12. EVENT_TYPE_CLICK,
  13. EVENT_TYPE_LONG_CLICK,
  14. EVENT_TYPE_POINTER_DOWN,
  15. EVENT_TYPE_POINTER_UP,
  16. EVENT_TYPE_POINTER_MOVE,
  17. EVENT_TYPE_RIGHT_POINTER_DOWN,
  18. EVENT_TYPE_RIGHT_POINTER_UP,
  19. EVENT_TYPE_WHEEL,
  20. EVENT_TYPE_CHANGED,
  21. EVENT_TYPE_KEY_DOWN,
  22. EVENT_TYPE_KEY_UP,
  23. EVENT_TYPE_SHORTCUT,
  24. EVENT_TYPE_CONTEXT_MENU,
  25. EVENT_TYPE_FILE_DROP,
  26. EVENT_TYPE_TAB_CHANGED,
  27. EVENT_TYPE_CUSTOM
  28. }
  29. */
  30. export interface UIWidgetEvent {
  31. handler: UIWidget;
  32. target: UIWidget;
  33. type: number; /*UIWidgetEventType*/
  34. x: number;
  35. y: number;
  36. deltax: number;
  37. deltay: number;
  38. count: number;
  39. key: number;
  40. specialkey: number;
  41. modifierkeys: number;
  42. refid: string;
  43. touch: boolean;
  44. }
  45. export interface AttributeInfo {
  46. type:VariantType;
  47. name:string;
  48. mode:number; // AM_*
  49. defaultValue:string;
  50. enumNames:string[];
  51. }
  52. export function getArguments(): Array<string>;
  53. export function getEngine(): Engine;
  54. export function getInput(): Input;
  55. export function getGraphics(): Graphics;
  56. export function getFileSystem(): FileSystem;
  57. export function getResourceCache(): ResourceCache;
  58. export function getParentPath(path: string): string;
  59. export function addTrailingSlash(path: string): string;
  60. export function getExtension(path: string): string;
  61. export function splitPath(path: string): PathInfo;
  62. }
  63. declare module ToolCore {
  64. export function getToolEnvironment(): ToolEnvironment;
  65. export function getToolSystem(): ToolSystem;
  66. export function getAssetDatabase(): AssetDatabase;
  67. }