2022-04-10 08:22:58 +00:00
|
|
|
// Copyright 2022 Dietrich Epp.
|
|
|
|
// This file is part of SyncFiles. SyncFiles is licensed under the terms of the
|
|
|
|
// Mozilla Public License, version 2.0. See LICENSE.txt for details.
|
2022-04-10 08:09:17 +00:00
|
|
|
#ifndef MACOS_PROJECT_H
|
|
|
|
#define MACOS_PROJECT_H
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// A ProjectHandle is a handle to a synchronization project.
|
2022-04-10 08:09:17 +00:00
|
|
|
typedef struct Project **ProjectHandle;
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// ProjectNew creates a new empty synchronization project.
|
2022-04-10 08:09:17 +00:00
|
|
|
void ProjectNew(void);
|
|
|
|
|
2023-05-07 01:36:33 +00:00
|
|
|
// ProjectOpen opens an existing synchronization project.
|
|
|
|
void ProjectOpen(FSSpec *spec, ScriptCode script);
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// ProjectAdjustMenus adjusts menus before selecting a menu item.
|
2022-04-10 08:09:17 +00:00
|
|
|
void ProjectAdjustMenus(ProjectHandle project, MenuHandle fileMenu);
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// ProjectCommand handles a menu command or equivalent.
|
2022-04-10 08:09:17 +00:00
|
|
|
void ProjectCommand(WindowRef window, ProjectHandle project, int menuID,
|
|
|
|
int item);
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// ProjectUpdate handles an update event for a project window.
|
2022-04-10 08:09:17 +00:00
|
|
|
void ProjectUpdate(WindowRef window, ProjectHandle project);
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// ProjectActivate sets whether a project window is active.
|
2022-04-10 08:09:17 +00:00
|
|
|
void ProjectActivate(WindowRef window, ProjectHandle project, int isActive);
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// ProjectMouseDown handles a mouse down event in a window.
|
2022-04-10 08:09:17 +00:00
|
|
|
void ProjectMouseDown(WindowRef window, ProjectHandle project,
|
|
|
|
EventRecord *event);
|
|
|
|
|
|
|
|
#endif
|