Skip to content

Expose SetVertPos in the API #1946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ReaScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ Mode values:
* 1 = compatibility decomposition

Warning: this function is no-op on Windows XP (the input string is returned as-is).)", },
{ APIFUNC(CF_SetTcpScroll), "void", "MediaTrack*,int", "track,extraPixels", "Scroll the TCP to the specified track (if non-null) + extraPixels.", },

{ APIFUNC(CF_CreatePreview), "CF_Preview*", "PCM_source*", "source", R"(Create a new preview object. Does not take ownership of the source (don't forget to destroy it unless it came from a take!). See CF_Preview_Play and the others CF_Preview_* functions.

Expand Down
1 change: 1 addition & 0 deletions Zoom.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ void ZoomSlice();
int ZoomInit(bool hookREAPERWndProcs);
void ZoomExit();
void ZoomToSelItems(COMMAND_T* = NULL);
void SetVertPos(HWND, int iTrack, bool trackIsPixels, int extraPixels);
7 changes: 7 additions & 0 deletions cfillion/cfillion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "SnM/SnM_FX.h"
#include "SnM/SnM_Window.h"
#include "version.h"
#include "Zoom.h"

#include <WDL/localize/localize.h>
#include <WDL/projectcontext.h>
Expand Down Expand Up @@ -582,6 +583,12 @@ BOOL CF_GetScrollInfo(HWND hwnd, const int bar, LPSCROLLINFO si)
return rv;
}

void CF_SetTcpScroll(MediaTrack *track, const int extraPixels)
{
const int iTrack { track ? CSurf_TrackToID(track, false) : extraPixels };
SetVertPos(GetTrackWnd(), iTrack, track == nullptr, extraPixels);
}

void CF_NormalizeUTF8(const char *input, const unsigned int mode,
char *output, int outputSize)
{
Expand Down
1 change: 1 addition & 0 deletions cfillion/cfillion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ bool CF_PCM_Source_SetSectionInfo(PCM_source *section, PCM_source *source,
double offset, double length, bool reverse, const double *fade);

BOOL CF_GetScrollInfo(HWND, int bar, LPSCROLLINFO);
void CF_SetTcpScroll(MediaTrack *, int extraPixels);

void CF_NormalizeUTF8(const char *input, unsigned int mode, char *output, int outputSize);

Expand Down