Source

Kephra / lib / Kephra / API.pm

Full commit
Herbert Breunung 18bb4e7 

Herbert Breunung 36adcac 
Herbert Breunung 320b6b3 
Herbert Breunung 7315592 
Herbert Breunung 320b6b3 

Herbert Breunung 84c8ffb 

Herbert Breunung fae20c5 
Herbert Breunung 36adcac 
Herbert Breunung 0929a31 
Herbert Breunung 36adcac 
Herbert Breunung 66b13e3 
Herbert Breunung 84c8ffb 
Herbert Breunung 9b67628 
Herbert Breunung 0929a31 
Herbert Breunung 676c3f0 
Herbert Breunung 36adcac 
Herbert Breunung ee2ff2e 
Herbert Breunung de222da 







Herbert Breunung b9cfdfa 




Herbert Breunung 7315592 



Herbert Breunung 0a45a50 
Herbert Breunung b9cfdfa 

Herbert Breunung f05812e 

Herbert Breunung 36adcac 







Herbert Breunung 0a45a50 
Herbert Breunung 4aa3a06 
Herbert Breunung 3e2f18e 
Herbert Breunung 679cf70 
Herbert Breunung dba447d 


Herbert Breunung 4d9f408 

Herbert Breunung 679cf70 
Herbert Breunung 4d9f408 

Herbert Breunung 6f0870a 






Herbert Breunung 4d9f408 



Herbert Breunung e20bd84 
Herbert Breunung 4d9f408 

Herbert Breunung 36adcac 
Herbert Breunung dba447d 
Herbert Breunung c9bbd34 
Herbert Breunung 36adcac 
use strict;
use warnings;

use Kephra::API::Command;
use Kephra::API::Doc;
use Kephra::API::Event;
use Kephra::API::KeyMap;
#use Kephra::API::Plugin;
#use Kephra::API::Sandrum;
use Kephra::App::Focus;
#use Kephra::App::Window;
use Kephra::App::Bar::Document;
#use Kephra::Config;
use Kephra::Log;
#use Kephra::Worker;


package Kephra::API;
my $VERSION = 0.1;

Kephra::API::Command::switch_variables({
 '$app'    => { switch => 'app',         class => 'Kephra::App' },
 '$win'    => { switch => 'main_window', class => 'Kephra::App::Window' },
 '$docbar' => { switch => 'docbar',      class => 'Kephra::App::Bar::Document' },
 '$doc'    => { switch => 'document',    class => 'Kephra::Document' },
 '$ed'     => { switch => 'editor',      class => 'Kephra::App::Editor' },
});

sub app                 { $Kephra::App::_ref }
sub main_window         { $Kephra::App::Frame::_ref }
sub docbar              { Kephra::App::Part::Editor::docbar() }
sub all_docbars         { Kephra::App::Part::Editor::all_docbars() }
sub passive_docbars     { Kephra::App::Part::Editor::passive_docbars() }
sub document            { Kephra::API::Doc::active() }
sub all_documents       { Kephra::API::Doc::all() }
sub do_with_all_editors {&Kephra::API::Doc::do_with_all_editors }
sub editor              { Kephra::API::Doc::active_editor() }

sub focus               { Kephra::App::Focus::set(@_) }
sub focus_back          { Kephra::App::Focus::set_back(@_) }

# IO-unit
#sub input  { main_window()->{'part'}{'iounit'}->get_line() if ref main_window() and exists main_window()->{'part'}{'iounit'} }
#sub output { main_window()->{'part'}{'iounit'}->output(@_) if ref main_window() and exists main_window()->{'part'}{'iounit'} }
#sub log    { main_window()->{'part'}{'iounit'}->output('log', @_) if ref main_window() and exists main_window()->{'part'}{'iounit'} }

sub note {}
sub warn {}
sub error {}


sub configs  { }

# command list
sub add_command { }
sub del_command { }
sub run_command { }
sub command_status {}

# cmd line lang
sub run_sandrum_commands {}

# event table
sub add_event_callback { }
sub del_event_callback { }
sub trigger_event      { }
sub freeze_event       { }
sub thaw_event         { }

# plugin API
sub register_plugin {}
sub get_plugin_status {}
sub get_plugin_data {}
sub available_plugins {}
sub unregister_plugin {}

# if you want to know more, read Kephra::Internals.pod


1;