Adobe.com
Contents Suites Classes Class Index Member Index

AICommandManager.h

Go to the documentation of this file.
00001 #ifndef __AICommandManager__
00002 #define __AICommandManager__
00003 
00004 /*
00005  *        Name: AICommandManager.h
00006  *   $Revision: 6 $
00007  *      Author: Grace Ge
00008  *        Date:
00009  *     Purpose: .
00010  *
00011  * ADOBE SYSTEMS INCORPORATED
00012  * Copyright 1986-2007 Adobe Systems Incorporated.
00013  * All rights reserved.
00014  *
00015  * NOTICE:  Adobe permits you to use, modify, and distribute this file
00016  * in accordance with the terms of the Adobe license agreement
00017  * accompanying it. If you have received this file from a source other
00018  * than Adobe, then your use, modification, or distribution of it
00019  * requires the prior written permission of Adobe.
00020  *
00021  */
00022 
00023 
00024 /*******************************************************************************
00025  **
00026  **     Imports
00027  **
00028  **/
00029 
00030 #ifndef __AITypes__
00031 #include "AITypes.h"
00032 #endif
00033 
00034 #ifndef __AIPlugin__
00035 #include "AIPlugin.h"
00036 #endif
00037 
00038 #include "AIUnicodeString.h"
00039 
00040 #include "AIHeaderBegin.h"
00041 
00045 /*******************************************************************************
00046  **
00047  **     Constants
00048  **
00049  **/
00050 
00051 #define kAICommandManagerSuite                  "AI Command Manager Suite"
00052 
00053 //deleting the previous version numbers so that they are not used
00054 #define kAICommandManagerSuiteVersion5  AIAPI_VERSION(5)
00055 #define kAICommandManagerSuiteVersion   kAICommandManagerSuiteVersion5
00056 #define kAICommandManagerVersion                kAICommandManagerSuiteVersion
00057 
00058 /*******************************************************************************
00059  **
00060  **     Types
00061  **
00062  **/
00063 
00065 typedef struct {
00067         SPMessageData d;
00069         AICommandID commandID;
00071         ai::int32 key;
00073         ai::uint32 aiModifiers;
00075         char *commandStr;
00077         char *localizedStr;
00078 } AICommandMessage;
00079 
00080 typedef struct {
00082         SPMessageData d;
00087         AIBoolean                       handled;
00088 } AIClearCommandMessage;
00089 
00090 /*
00091  * PluginCommand Message
00092  */
00093 
00097 #define kCallerAICommand                                        "Plugin Command Manager"
00098 
00101 #define kSelectorAICommand                                      "Do Plugin Command"
00102 
00103 #define kSelectorAIClearCommand                         "Do Clear Command"
00104 
00106 #define kAICommandNormalContext                         0x0000
00107 
00108 #define kAICommandTextEditContext                       0x0001
00109 
00110 #define kAICommandToolBoxContext                        0x0002
00111 
00112 #define kAICommandPluginContext                         0x0004
00113 
00114 /*******************************************************************************
00115  **
00116  **     Suite
00117  **
00118  **/
00119 
00125 typedef struct {
00126 
00133         AIAPI AIErr (*AddCommand) (AICommandID commandID, const char *name, const ai::UnicodeString& localizedName);
00134 
00139         AIAPI AIErr (*GetCommandIDFromName) (const char *name, AICommandID *commandID);
00140 
00145         AIAPI AIErr (*GetCommandIDFromLocalizedName) (const ai::UnicodeString& localizedName, AICommandID *commandID);
00146 
00152         AIAPI AIErr (*GetCommandName) (AICommandID commandID, char *name);
00153 
00159         AIAPI AIErr (*GetCommandLocalizedName) (AICommandID commandID, ai::UnicodeString& localizedName);
00160 
00162         AIAPI AIErr (*TestFunctionKey) (ai::int32 fkey, ai::uint32 aiModifiers, AIBoolean *used);
00164         AIAPI AIErr (*SetActionFunctionKey) (ai::int32 fkey, ai::uint32 aiModifiers);
00166         AIAPI AIErr (*ClearActionFunctionKey) (ai::int32 fkey, ai::uint32 aiModifiers);
00167 
00175         AIAPI AIErr (*GetCommandIDFromShortCutKey) (int key, ai::uint32 aiModifiers, AICommandID *commandID);
00176 
00183         AIAPI AIErr (*SearchCommandLocalizedName) (const ai::UnicodeString& partialName, ai::UnicodeString& localizedName);
00184 
00186         AIAPI AIErr (*GetShortCutKeyFromCommandID) (AICommandID commandID, ai::int32 context, ai::int32 *key, ai::uint32 *aiModifiers, ai::int32 *represent);
00188         AIAPI AIErr (*SetShortCutKeyFromCommandID) (AICommandID commandID, ai::int32 context, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent);
00190         AIAPI AIErr (*DeleteShortCutKeyFromCommandID) (AICommandID commandID, ai::int32 context, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent);
00191 
00193         AIAPI AIErr (*GetShortCutKeyOfCommandEx) (AICommandID commandID, ai::int32 context, char *commandStr, ai::int32 *key, ai::uint32 *aiModifiers, ai::int32 *represent);
00195         AIAPI AIErr (*SetShortCutKeyOfCommandEx) (AICommandID commandID, ai::int32 context, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent,
00196                                                                                                 const char *commandStr, char *localizedStr, SPPluginRef pluginRef);
00198         AIAPI AIErr (*DeleteShortCutKeyOfCommandEx) (AICommandID commandID, ai::int32 context, char *commandStr, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent);
00200         AIAPI AIErr (*GetCommandExFromShortCutKey) (ai::int32 key, ai::uint32 aiModifiers, ai::int32 context, AICommandID *commandID,
00201                 SPPluginRef *pluginRef, char *commandStr, ai::int32 maxCommandStr, char *localizedStr, ai::int32 maxLocalizedStr);
00202 
00204         AIAPI AIErr (*SetActionFunctionKeyEx) (ai::int32 fkey, ai::uint32 aiModifiers, char *commandStr);
00205 
00207         AIAPI AIErr (*CountCommands)(ai::int32 *totalCommands);
00209         AIAPI AIErr (*GetNthCommandInfo)(ai::int32 index, AICommandID *commandID, ai::int32 *context, ai::int32 *key, ai::int32 *represent, ai::uint32 *aiModifiers,
00210                                                                         SPPluginRef *pluginRef, char *commandStr, ai::int32 maxCommandStr, char *localizedStr, ai::int32 maxLocalizedStr);
00211 
00215         AIAPI AIErr (*DeleteCommand) (AICommandID commandID);
00216 
00221         AIAPI AIErr (*GetCommandNotifierName) (AICommandID commandID, ai::UnicodeString& notifierName);
00222 
00223 } AICommandManagerSuite;
00224 
00225 #include "AIHeaderEnd.h"
00226 
00227 #endif


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks