Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

pluginclient.h File Reference

#include "arraylist.h"
#include "condition.h"
#include "keyframe.h"
#include "mainprogress.inc"
#include "maxbuffers.h"
#include "plugincommands.h"
#include "pluginserver.inc"
#include "theme.inc"
#include "vframe.h"

Go to the source code of this file.

Classes

class  PluginClientAuto
class  PluginClient

Defines

#define BCASTDIR   "~/.bcast/"
#define REGISTER_PLUGIN(class_title)
#define WINDOW_CLOSE_EVENT(window_class)
#define PLUGIN_THREAD_HEADER(plugin_class, thread_class, window_class)
#define PLUGIN_THREAD_OBJECT(plugin_class, thread_class, window_class)
#define PLUGIN_CLASS_MEMBERS(config_name, thread_name)
#define PLUGIN_CONSTRUCTOR_MACRO
#define PLUGIN_DESTRUCTOR_MACRO
#define SHOW_GUI_MACRO(plugin_class, thread_class)
#define RAISE_WINDOW_MACRO(plugin_class)
#define SET_STRING_MACRO(plugin_class)
#define NEW_PICON_MACRO(plugin_class)
#define LOAD_CONFIGURATION_MACRO(plugin_class, config_class)

Functions

PluginClientnew_plugin (PluginServer *server)


Define Documentation

#define BCASTDIR   "~/.bcast/"
 

Definition at line 6 of file pluginclient.h.

Referenced by BatchRenderThread::create_path(), PluginClient::get_defaultdir(), MWindow::init_defaults(), PluginAClientLAD::load_defaults(), main(), Preferences::Preferences(), and ChannelDB::prefix_to_path().

#define LOAD_CONFIGURATION_MACRO plugin_class,
config_class   ) 
 

Definition at line 174 of file pluginclient.h.

#define NEW_PICON_MACRO plugin_class   ) 
 

Value:

VFrame* plugin_class::new_picon() \
{ \
        return new VFrame(picon_png); \
}

Definition at line 168 of file pluginclient.h.

#define PLUGIN_CLASS_MEMBERS config_name,
thread_name   ) 
 

Value:

int load_configuration(); \
        VFrame* new_picon(); \
        char* plugin_title(); \
        int show_gui(); \
        int set_string(); \
        void raise_window(); \
        Defaults *defaults; \
        config_name config; \
        thread_name *thread;

Definition at line 101 of file pluginclient.h.

#define PLUGIN_CONSTRUCTOR_MACRO
 

Value:

thread = 0; \
        defaults = 0; \
        load_defaults(); \

Definition at line 112 of file pluginclient.h.

Referenced by PluginAClientLAD::PluginAClientLAD().

#define PLUGIN_DESTRUCTOR_MACRO
 

Value:

if(thread) \
        { \
/* This is needed when the GUI is closed from elsewhere than itself */ \
                thread->window->lock_window("PLUGIN_DESTRUCTOR_MACRO"); \
                thread->window->set_done(0); \
                thread->window->unlock_window(); \
                thread->completion->lock("PLUGIN_DESTRUCTOR_MACRO"); \
                delete thread; \
        } \
 \
 \
        if(defaults) save_defaults(); \
        if(defaults) delete defaults;

Definition at line 117 of file pluginclient.h.

Referenced by PluginAClientLAD::~PluginAClientLAD().

#define PLUGIN_THREAD_HEADER plugin_class,
thread_class,
window_class   ) 
 

Value:

class thread_class : public Thread \
{ \
public: \
        thread_class(plugin_class *plugin); \
        ~thread_class(); \
        void run(); \
        window_class *window; \
        plugin_class *plugin; \
        Condition *completion; \
};

Definition at line 56 of file pluginclient.h.

#define PLUGIN_THREAD_OBJECT plugin_class,
thread_class,
window_class   ) 
 

Value:

thread_class::thread_class(plugin_class *plugin) \
 : Thread(0, 0, 0) \
{ \
        this->plugin = plugin; \
        completion = new Condition(0, "thread_class::completion"); \
} \
 \
thread_class::~thread_class() \
{ \
        delete window; \
} \
 \
void thread_class::run() \
{ \
        BC_DisplayInfo info; \
        window = new window_class(plugin,  \
                info.get_abs_cursor_x() - 75,  \
                info.get_abs_cursor_y() - 65); \
        window->create_objects(); \
 \
/* Only set it here so tracking doesn't update it until everything is created. */ \
        plugin->thread = this; \
        int result = window->run_window(); \
        completion->unlock(); \
/* This is needed when the GUI is closed from itself */ \
        if(result) plugin->client_side_close(); \
}

Definition at line 69 of file pluginclient.h.

#define RAISE_WINDOW_MACRO plugin_class   ) 
 

Value:

void plugin_class::raise_window() \
{ \
        if(thread) \
        { \
                thread->window->lock_window(); \
                thread->window->raise_window(); \
                thread->window->flush(); \
                thread->window->unlock_window(); \
        } \
}

Definition at line 144 of file pluginclient.h.

#define REGISTER_PLUGIN class_title   ) 
 

Value:

PluginClient* new_plugin(PluginServer *server) \
{ \
        return new class_title(server); \
}

Definition at line 40 of file pluginclient.h.

#define SET_STRING_MACRO plugin_class   ) 
 

Value:

int plugin_class::set_string() \
{ \
        if(thread) \
        { \
                thread->window->lock_window(); \
                thread->window->set_title(gui_string); \
                thread->window->unlock_window(); \
        } \
        return 0; \
}

Definition at line 156 of file pluginclient.h.

#define SHOW_GUI_MACRO plugin_class,
thread_class   ) 
 

Value:

int plugin_class::show_gui() \
{ \
        load_configuration(); \
        thread_class *new_thread = new thread_class(this); \
        new_thread->start(); \
        return 0; \
}

Definition at line 135 of file pluginclient.h.

#define WINDOW_CLOSE_EVENT window_class   ) 
 

Value:

int window_class::close_event() \
{ \
/* Set result to 1 to indicate a client side close */ \
        set_done(1); \
        return 1; \
}

Definition at line 47 of file pluginclient.h.


Function Documentation

PluginClient* new_plugin PluginServer server  ) 
 

Referenced by PluginSet::copy_from(), MWindow::init_plugin_path(), and PluginSet::optimize().


Generated on Sun Jan 8 13:39:05 2006 for Cinelerra-svn by  doxygen 1.4.4