<commit_before>#ifndef AXLIB_DISPLAY_H
#define AXLIB_DISPLAY_H

#include <Carbon/Carbon.h>
#include <string>
#include <map>


/* NOTE(koekeishiya): User controlled spaces */
#define kCGSSpaceUser 0

/* NOTE(koekeishiya): System controlled spaces (dashboard) */
#define kCGSSpaceSystem 2

/* NOTE(koekeishiya): Fullscreen applications */
#define kCGSSpaceFullscreen 4

enum CGSSpaceSelector
{
    kCGSSpaceCurrent = 5,
    kCGSSpaceOther = 6,
    kCGSSpaceAll = 7
};

typedef int CGSSpaceID;
typedef int CGSSpaceType;

struct ax_window;
enum ax_space_flags
{
    AXSpace_DeminimizedTransition = (1 << 0),
    AXSpace_CmdTabTransition = (1 << 1),
};

struct ax_space
{
    CFStringRef Identifier;
    CGSSpaceID ID;
    CGSSpaceType Type;
    uint32_t Flags;
};

struct ax_display
{
    unsigned int ArrangementID;
    CFStringRef Identifier;
    CGDirectDisplayID ID;
    CGRect Frame;

    ax_space *Space;
    std::map<CGSSpaceID, ax_space> Spaces;
};

inline bool
AXLibHasFlags(ax_space *Space, uint32_t Flag)
{
    bool Result = Space->Flags & Flag;
    return Result;
}

inline void
AXLibAddFlags(ax_space *Space, uint32_t Flag)
{
    Space->Flags |= Flag;
}

inline void
AXLibClearFlags(ax_space *Space, uint32_t Flag)
{
    Space->Flags &= ~Flag;
}


void AXLibInitializeDisplays(std::map<CGDirectDisplayID, ax_display> *AXDisplays);
ax_space * AXLibGetActiveSpace(ax_display *Display);

ax_display *AXLibMainDisplay();
ax_display *AXLibWindowDisplay(ax_window *Window);
ax_display *AXLibNextDisplay(ax_display *Display);
ax_display *AXLibPreviousDisplay(ax_display *Display);

unsigned int AXLibDesktopIDFromCGSSpaceID(ax_display *Display, CGSSpaceID SpaceID);
CGSSpaceID AXLibCGSSpaceIDFromDesktopID(ax_display *Display, unsigned int DesktopID);
bool AXLibIsWindowOnSpace(ax_window *Window, CGSSpaceID SpaceID);

#endif
<commit_msg>remove unnecessary space flag<commit_after>#ifndef AXLIB_DISPLAY_H
#define AXLIB_DISPLAY_H

#include <Carbon/Carbon.h>
#include <string>
#include <map>


/* NOTE(koekeishiya): User controlled spaces */
#define kCGSSpaceUser 0

/* NOTE(koekeishiya): System controlled spaces (dashboard) */
#define kCGSSpaceSystem 2

/* NOTE(koekeishiya): Fullscreen applications */
#define kCGSSpaceFullscreen 4

enum CGSSpaceSelector
{
    kCGSSpaceCurrent = 5,
    kCGSSpaceOther = 6,
    kCGSSpaceAll = 7
};

typedef int CGSSpaceID;
typedef int CGSSpaceType;

struct ax_window;
enum ax_space_flags
{
    AXSpace_DeminimizedTransition = (1 << 0),
};

struct ax_space
{
    CFStringRef Identifier;
    CGSSpaceID ID;
    CGSSpaceType Type;
    uint32_t Flags;
};

struct ax_display
{
    unsigned int ArrangementID;
    CFStringRef Identifier;
    CGDirectDisplayID ID;
    CGRect Frame;

    ax_space *Space;
    std::map<CGSSpaceID, ax_space> Spaces;
};

inline bool
AXLibHasFlags(ax_space *Space, uint32_t Flag)
{
    bool Result = Space->Flags & Flag;
    return Result;
}

inline void
AXLibAddFlags(ax_space *Space, uint32_t Flag)
{
    Space->Flags |= Flag;
}

inline void
AXLibClearFlags(ax_space *Space, uint32_t Flag)
{
    Space->Flags &= ~Flag;
}


void AXLibInitializeDisplays(std::map<CGDirectDisplayID, ax_display> *AXDisplays);
ax_space * AXLibGetActiveSpace(ax_display *Display);

ax_display *AXLibMainDisplay();
ax_display *AXLibWindowDisplay(ax_window *Window);
ax_display *AXLibNextDisplay(ax_display *Display);
ax_display *AXLibPreviousDisplay(ax_display *Display);

unsigned int AXLibDesktopIDFromCGSSpaceID(ax_display *Display, CGSSpaceID SpaceID);
CGSSpaceID AXLibCGSSpaceIDFromDesktopID(ax_display *Display, unsigned int DesktopID);
bool AXLibIsWindowOnSpace(ax_window *Window, CGSSpaceID SpaceID);

#endif

{'fraction_non_alphanumeric': 0.09357045143638851, 'fraction_numerical': 0.009302325581395349, 'mean_word_length': 5.516934046345811, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3905574', 'n_tokens_mistral': 1346, 'n_tokens_neox': 1267, 'n_words': 290}