AtomicWork.d.ts 2.2 KB

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