lyx_mirror/src/support/AppleScript.h
Stephan Witt 4674c3e1c5 Patch from Benjamin Piwowar - see ticket #8185:
In order to interact with native osx applications, AppleScript support is a plus.
Here is a patch that makes LyX respond to a simple command (run) and that allows to communicate with LyX as with the LyX client.
Example of use:
	tell application "LyX" to run "server-get-filename" with argument ""'
returns
	message:/Users/bpiwowar/newfile1.lyx, code:0
with a message and the error code
2012-08-19 22:27:20 +02:00

32 lines
694 B
C++

// -*- C++ -*-
/**
* \file AppleScript.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Benjamin Piwowarski
*
* Full author contact details are available in file CREDITS.
*/
#ifndef LYX_SUPPORT_APPLESCRIPT_H
#define LYX_SUPPORT_APPLESCRIPT_H
#ifdef __cplusplus
extern "C" {
#endif
/// What is returned by applescript_execute_command
typedef struct {
int code;
char *message;
} LyXFunctionResult;
LyXFunctionResult applescript_execute_command(const char *cmd, const char *args);
/// Sets up apple script support
void setupApplescript();
#ifdef __cplusplus
}
#endif
#endif