Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/EclipseMenu/bindings into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaghettDev committed Jul 26, 2024
2 parents a086301 + 6862ae5 commit 7061359
Show file tree
Hide file tree
Showing 15 changed files with 2,253 additions and 1,288 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ jobs:
-DCMAKE_OSX_ARCHITECTURES=arm64
-D USE_HACKY_SCRIPT=ON
- name: iOS
os_identifier: ios
os: macos-latest
extra_flags: >
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_OSX_ARCHITECTURES=arm64
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0
-DCMAKE_SYSTEM_NAME=iOS
-D USE_HACKY_SCRIPT=ON
name: Test Offsets ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}

Expand Down
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ if (NOT DEFINED GEODE_LOADER_PATH)
message(FATAL_ERROR "GEODE_LOADER_PATH is not defined.")
endif()

option(
BINDINGS_VERSIONED_ONLY
"Disables inclusion of the unversioned Enums header, allowing for builds on older Geode/Geometry Dash versions."
OFF
)

if (NOT GEODE_BINDINGS_PATH)
set(GEODE_BINDINGS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bindings/${GEODE_GD_VERSION})
endif()
Expand Down Expand Up @@ -153,9 +159,14 @@ endif()
add_library(${PROJECT_NAME} ${GEODE_CODEGEN_PATH}/Geode/GeneratedSource.cpp)
target_include_directories(${PROJECT_NAME} PUBLIC
${GEODE_CODEGEN_PATH}
${CMAKE_CURRENT_SOURCE_DIR}/bindings/include
)

if (NOT BINDINGS_VERSIONED_ONLY)
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/bindings/include
)
endif()

set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)

Expand Down
47 changes: 47 additions & 0 deletions bindings/1.920/Cocos2d.bro
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,43 @@ class cocos2d::extension::CCHttpClient {
void send(cocos2d::extension::CCHttpRequest*);
}

[[link(win, android)]]
class cocos2d::CCIMEDispatcher {
static cocos2d::CCIMEDispatcher* sharedDispatcher();

// CCIMEDispatcher();

void addDelegate(cocos2d::CCIMEDelegate*);
bool attachDelegateWithIME(cocos2d::CCIMEDelegate*);
bool detachDelegateWithIME(cocos2d::CCIMEDelegate*);
void dispatchDeleteBackward();
void dispatchInsertText(char const*, int);
void dispatchKeyboardDidHide(cocos2d::CCIMEKeyboardNotificationInfo&);
void dispatchKeyboardDidShow(cocos2d::CCIMEKeyboardNotificationInfo&);
void dispatchKeyboardWillHide(cocos2d::CCIMEKeyboardNotificationInfo&);
void dispatchKeyboardWillHide();
void dispatchKeyboardWillShow(cocos2d::CCIMEKeyboardNotificationInfo&);
char const* getContentText();
bool hasDelegate();
void removeDelegate(cocos2d::CCIMEDelegate*);
}

[[link(win, android)]]
class cocos2d::CCKeyboardDispatcher {
bool dispatchKeyboardMSG(cocos2d::enumKeyCodes, bool);
}

[[link(win, android)]]
class cocos2d::CCMouseDispatcher {
// CCMouseDispatcher(cocos2d::CCMouseDispatcher const&);
// CCMouseDispatcher();
void addDelegate(cocos2d::CCMouseDelegate*);
bool dispatchScrollMSG(float, float);
void forceAddDelegate(cocos2d::CCMouseDelegate*);
void forceRemoveDelegate(cocos2d::CCMouseDelegate*);
void removeDelegate(cocos2d::CCMouseDelegate*);
}

[[link(win, android)]]
class DS_Dictionary {
bool getBoolForKey(const char*);
Expand All @@ -477,3 +509,18 @@ class DS_Dictionary {
bool loadRootSubDictFromString(gd::string);
bool loadRootSubDictFromCompressedFile(const char*);
}

[[link(win, android)]]
class ObjectDecoder {
// virtual ~ObjectDecoder();

static ObjectDecoder* sharedDecoder();

cocos2d::CCObject* getDecodedObject(int, DS_Dictionary*);

virtual bool init();
virtual ObjectDecoderDelegate* getDelegate() const;
virtual void setDelegate(ObjectDecoderDelegate*);

// ObjectDecoderDelegate* m_delegate;
}
Loading

0 comments on commit 7061359

Please sign in to comment.