AtomicWork.d.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 UIWidgetDeletedEvent {
  47. widget: UIWidget;
  48. }
  49. export interface AttributeInfo {
  50. type:VariantType;
  51. name:string;
  52. mode:number; // AM_*
  53. defaultValue:string;
  54. enumNames:string[];
  55. }
  56. export interface ShaderParameter {
  57. name:string;
  58. value:any;
  59. valueString:string;
  60. typeName:string;
  61. type:VariantType;
  62. }
  63. export function getArguments(): Array<string>;
  64. export function getEngine(): Engine;
  65. export function getInput(): Input;
  66. export function getGraphics(): Graphics;
  67. export function getFileSystem(): FileSystem;
  68. export function getResourceCache(): ResourceCache;
  69. export function getParentPath(path: string): string;
  70. export function addTrailingSlash(path: string): string;
  71. export function getExtension(path: string): string;
  72. export function splitPath(path: string): PathInfo;
  73. }
  74. declare module ToolCore {
  75. export function getToolEnvironment(): ToolEnvironment;
  76. export function getToolSystem(): ToolSystem;
  77. export function getAssetDatabase(): AssetDatabase;
  78. }