Skip to content
mozahzah edited this page Aug 19, 2025 · 12 revisions
IELogo

Welcome to the IEActions Wiki!

IEActions is a open-source extension library designed for Linux, Windows and macOS applications. It provides an abstracted action class that enables programmatic execution of various actions such as volume control, muting, console commands, and file opening. This library serves as a versatile interface for managing different computer actions in applications.


Prerequisites

The C/C++ development environments for Windows and macOS come with all necessary dependencies for compiling IEActions, but on Linux you will need the ALSA library development kit.

Important

For Linux users, IEActions depends on IEAudio4Linux. Ensure you run the following command to initialize the submodule: git submodule update --init --recusive . Additionally, follow the prerequisites outlined below For more in depth, visit the IEAudio4Linux Wiki

RHEL Based (Fedora)

On Red Hat and derivatives like Fedora, run:

sudo dnf install alsa-lib-devel

Debian Based (Ubuntu)

On Debian and derivatives like Ubuntu, run:

sudo apt install libasound2-dev

Getting Started

Launch your preferred terminal and navigate to a empty working directory.
Clone IEActions to the working directory.

git clone https://github.com/Interactive-Echoes/IEActions.git
cd IEActions

IEActions uses CMake as its build system. To get started, ensure you have CMake installed and follow these steps:

  1. Make sure IEActions and all of its submodules are synced:

    git submodule update --init --recursive .
    git pull --recurse
  2. Generate Build Files:

    cmake -S . -B ./build

    This command creates a ./build directory where all the CMake-generated files will be placed.

  3. Build IEActions:

    cmake --build ./build

    After building, you can find the library in the ./build/bin directory named IEActions.

  4. Run the Example:
    Locate and double-click IEActionsExample in the ./build/bin/ or ./build/bin/<config> directory or run

    ./build/bin/IEActionsExample
    # ./build/bin/Debug/IEActionsExample
    # ./build/bin/Release/IEActionsExample

Integrating IEActions

To integrate the built IEActions library into your application:

  1. Include IEActions in Your Project:
    Add the IEActions directory to your application's project directory or if your application is using Git simply call:

    git submodule add https://github.com/Interactive-Echoes/IEActions.git ThirdParty/IEActions
    git submodule update --init --recursive
  2. Update CMakeLists.txt:
    In your application's CMakeLists.txt, include IEActions by adding:

    add_subdirectory(<path_to_IEActions>)
    # Example: add_subdirectory(ThirdParty/IEActions)
    target_link_libraries(<your-target> PUBLIC IEActions)
    target_include_directories(<your-target> PUBLIC <path_to_IEActions>)
  3. Verify Integration:
    Include the IEActions.h file in your application and verify the integration by compiling with:

    #include "IEActions.h"
    #include <iostream>
    
    int main()
    {
        if (const std::unique_ptr<IEAction_Volume> VolumeAction = IEAction::GetVolumeAction())
        {
            float Volume = 1.0f;
            std::cout << "Set system volume 0 to 1: ";
            std::cin >> Volume;
            VolumeAction->SetVolume(Volume);
            std::cout << "You have set your master audio output volume to " << VolumeAction->GetVolume() << ".\n";
        }
        return 0;
    };

Code Example

You can find this same example file here IEActionsExample

Simple Console Demo App

In a simple demo app, you can instantiate any of the IEActions provided by the IEAction namespace. In this example, we instantiate a Volume action and a Mute action.

#include "IEActions.h"
#include <iostream>

int main()
{
    if (const std::unique_ptr<IEAction_Volume> VolumeAction = IEAction::GetVolumeAction())
    {
        float Volume = 1.0f;
        std::cout << "Set system volume 0 to 1: ";
        std::cin >> Volume;
        VolumeAction->SetVolume(Volume);
        std::cout << "You have set your master audio output volume to " << VolumeAction->GetVolume() << ".\n";
    }

    if (const std::unique_ptr<IEAction_Mute> MuteAction = IEAction::GetMuteAction())
    {
        int bMute = 0;
        std::cout << "Set system mute 0 or 1: ";
        std::cin >> bMute;
        MuteAction->SetMute(bMute ? true : false);

        if (MuteAction->GetMute())
        {
            std::cout << "You have muted your master audio output. \n";
        }
        else
        {
            std::cout << "You have un-muted your master audio output. \n";
        }
    }

    std::cout << "IEActions Example finished view the github Wiki for more.";
    return 0;
}

Note

While this example uses user input to set the volume, the program could set the volume programmatically based on other conditions or inputs.

  • Volume Action: This part of the code demonstrates how to use the IEAction_Volume action to set the system volume. The user is prompted to enter a volume level between 0 and 1, which is then set using the SetVolume method. The current volume level is retrieved and displayed using the GetVolume method.

  • Mute Action: This part of the code demonstrates how to use the IEAction_Mute action to mute or unmute the system audio. The user is prompted to enter 0 (unmute) or 1 (mute). The mute state is set using the SetMute method, and the current mute state is checked using the GetMute method to provide appropriate feedback to the user.