summaryrefslogtreecommitdiff
path: root/src/app.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-20 11:37:23 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-20 11:37:23 +0300
commit2d81addf78d6a8b0fb2f2959b04a385c4adffdf2 (patch)
tree5e0f45b9c945499bc6a6669563de13c5203981a6 /src/app.h
parent201021092d204680b353c82ce9e9beb76f3044e8 (diff)
Experimenting with independent popup windows
Toe dipping into multiple window support by allowing popup menu widgets to be displayed in independent windows. This is not a 100% replacement for native menus, but it gets pretty close.
Diffstat (limited to 'src/app.h')
-rw-r--r--src/app.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/app.h b/src/app.h
index 08589000..8966e8c7 100644
--- a/src/app.h
+++ b/src/app.h
@@ -22,8 +22,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
22 22
23#pragma once 23#pragma once
24 24
25/* Application core: event loop, base event processing, audio synth. */
26
27#include <the_Foundation/objectlist.h> 25#include <the_Foundation/objectlist.h>
28#include <the_Foundation/string.h> 26#include <the_Foundation/string.h>
29#include <the_Foundation/stringset.h> 27#include <the_Foundation/stringset.h>
@@ -35,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
35iDeclareType(Bookmarks) 33iDeclareType(Bookmarks)
36iDeclareType(DocumentWidget) 34iDeclareType(DocumentWidget)
37iDeclareType(GmCerts) 35iDeclareType(GmCerts)
36iDeclareType(MainWindow)
38iDeclareType(MimeHooks) 37iDeclareType(MimeHooks)
39iDeclareType(Periodic) 38iDeclareType(Periodic)
40iDeclareType(Root) 39iDeclareType(Root)
@@ -61,14 +60,12 @@ enum iAppEventMode {
61enum iUserEventCode { 60enum iUserEventCode {
62 command_UserEventCode = 1, 61 command_UserEventCode = 1,
63 refresh_UserEventCode, 62 refresh_UserEventCode,
64 arrange_UserEventCode,
65 asleep_UserEventCode, 63 asleep_UserEventCode,
66 /* The start of a potential touch tap event is notified via a custom event because 64 /* The start of a potential touch tap event is notified via a custom event because
67 sending SDL_MOUSEBUTTONDOWN would be premature: we don't know how long the tap will 65 sending SDL_MOUSEBUTTONDOWN would be premature: we don't know how long the tap will
68 take, it could turn into a tap-and-hold for example. */ 66 take, it could turn into a tap-and-hold for example. */
69 widgetTapBegins_UserEventCode, 67 widgetTapBegins_UserEventCode,
70 widgetTouchEnds_UserEventCode, /* finger lifted, but momentum may continue */ 68 widgetTouchEnds_UserEventCode, /* finger lifted, but momentum may continue */
71 immediateRefresh_UserEventCode, /* refresh even though more events are pending */
72}; 69};
73 70
74const iString *execPath_App (void); 71const iString *execPath_App (void);
@@ -119,8 +116,9 @@ iAny * findWidget_App (const char *id);
119void addTicker_App (iTickerFunc ticker, iAny *context); 116void addTicker_App (iTickerFunc ticker, iAny *context);
120void addTickerRoot_App (iTickerFunc ticker, iRoot *root, iAny *context); 117void addTickerRoot_App (iTickerFunc ticker, iRoot *root, iAny *context);
121void removeTicker_App (iTickerFunc ticker, iAny *context); 118void removeTicker_App (iTickerFunc ticker, iAny *context);
119void addPopup_App (iWindow *popup);
120void removePopup_App (iWindow *popup);
122void postRefresh_App (void); 121void postRefresh_App (void);
123void postImmediateRefresh_App(void);
124void postCommand_Root (iRoot *, const char *command); 122void postCommand_Root (iRoot *, const char *command);
125void postCommandf_Root (iRoot *, const char *command, ...); 123void postCommandf_Root (iRoot *, const char *command, ...);
126void postCommandf_App (const char *command, ...); 124void postCommandf_App (const char *command, ...);
@@ -138,3 +136,5 @@ iDocumentWidget * document_Command (const char *cmd);
138 136
139void openInDefaultBrowser_App (const iString *url); 137void openInDefaultBrowser_App (const iString *url);
140void revealPath_App (const iString *path); 138void revealPath_App (const iString *path);
139
140iMainWindow *mainWindow_App(void);