acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
application_apex.h
1//
2// Created by camilo on 2024-10-24 22:12 <3ThomasBorregaardSorensen!!
3//
4#pragma once
5
6
7#include "acme/constant/exclusive_instance.h"
8#include "acme/constant/scalar.h"
9
10
11namespace platform
12{
13
14
15// struct apex_application_layer_t
16// {
17// //__creatable(application);
18//
19// void* m_pnativeapp;
20//
21// ::string m_strNetworkingApplicationHostname;
22// //class application_impl * m_pappimpl;
23//
24// // 2020-01-25: removing from ::apex::system, placing here (at ::handler_context)
25// // 2020-07-23: now at ::application
26// ::pointer<::user::language_map> m_puserlanguagemap;
27//
28// //::pointer<::apex::application> m_pappParent;
29// string m_strBaseSupportId;
30// string m_strDatabaseAppId;
31// string m_strRelativeFolder;
32// string m_strInstallTraceLabel;
33// string m_strInstallBuild;
34// string m_strHttpUserAgentToken;
35// string m_strHttpUserAgentVersion;
36// bool m_bRequiresInstallation;
37//
38// bool m_bReadStringTable;
39//
40// ::pointer<class ::application_menu> m_papplicationmenu;
41// //::pointer<::apex::menu> m_pmainmenu;
42//
43// //::pointer<::game::game> m_pgame;
44//
45// ::pointer<::user::interaction_base> m_puiCurrent;
46// bool m_bContextTheme;
47//
48// // #if defined(LINUX) || defined(FREEBSD) || defined(OPENBSD)
49// // bool m_bSnLauncheeSetup;
50// // #endif
51// //semaphore m_semCompiler;
52// // former ::application_interface // moved on 2015-05-23 Sammstag while listening to RocketBeansTV (a German channel?) at TwitchTV
53// string_array_base m_straActivationMessage;
54//
55// ::u32 m_dwInstallGoodToCheckAgain;
56//
57// bool m_bAppHasInstallerProtected;
58// bool m_bAppHasInstallerChangedProtected;
59// ::pointer<::install::installer> m_pinstaller;
60//
61// particle_address_array m_particleaddressaEventHook;
62//
63// bool m_bAttendedFirstRequest;
64//
65// //bool m_bAgreeExit;
66// //bool m_bAgreeExitOk;
67// //bool m_bFranceExit;
68//
69// bool m_bEnableAutoStartOption;
70// bool m_bInterprocessCommunication;
71// ::pointer<::interprocess::communication> m_pinterprocesscommunication;
72// ::pointer<::interprocess::handler> m_pinterprocesshandler;
73// //::pointer<service> m_pservice;
74//
75// //::string_array_base m_straInterprocessCommunicationPendingHandleUri;
76//
77//
78// // apex commented
79// //::pointer < ::mutex > m_pmutexFrame;
80// //::pointer<::user::interaction_pointer_array> m_puiptraFrame;
81//
82// enum_thread_context m_ethreadcontextClose;
83//
84// enum_exclusive_instance m_eexclusiveinstance;
85//
86// bool m_bService;
87//
88// bool m_bUpdateMatterOnInstall;
89//
90// //::user::interaction * m_puiMainContainer;
91//
92// string_table_base m_stringtable;
93// string_table_base m_stringtableStd;
94// atom_map_base<string> m_stringmap;
95//
96// atom_map_base<::pointer<::channel>> m_mapNotify;
97//
98// string m_strLicense;
99//
100// ::i32 m_iWaitCursorCount; // for wait cursor (>0 => waiting)
101//
102// bool m_bEnableFsRawFolderProtocols = true;
103//
104// //::pointer<::simpledb::server> m_psimpledb;
105//
106// //::userex::pane_tab_impact * m_pmainpane;
107//
108//
109// string m_strHelpFilePath;
110//
111// //#ifdef WINDOWS
112// //
113// // HGLOBAL m_hDevMode; // printer Dev Mode
114// // HGLOBAL m_hDevNames; // printer Device Names
115// //
116// //#endif
117//
118// ::u32 m_dwPromptContext; // help action_context override for message box
119// // LKG
120// ::u32 m_dwPolicies; // block for storing boolean system policies
121//
122// // Support for Shift+F1 help mode.
123// // true if we're in SHIFT+F1 mode.
124// bool m_bHelpMode;
125//
126// //::userex::pane_tab_impact * m_ppaneimpactMain;
127//
128// string m_strProfileName;
129//
130// //#ifdef WINDOWS
131// // ATOM m_atomApp;
132// // ATOM m_atomSystemTopic; // for DDE open
133// //#endif
134//
135// ::u32 m_nNumThumbnailPages; // number of default printed pages
136//
137// string m_strId;
138//
139// ::i32 m_iResourceId;
140//
141// //::pointer<::experience::department> m_pexperience;
142// //::pointer<::apex::theme> m_ptheme;
143//
144//
145// string_array_base m_straAppInterest;
146//
147// ::pointer<::service_handler> m_pservicehandler;
148//
149// ::pointer<::networking::application> m_pnetworkingapplication;
150//
151// ::string_map_base<::pointer<::fs::folder_sync>> m_fsfoldersyncmap;
152//
153//
154// };
155
156
157 // struct apex_node_layer_t
158 // {
159 // //__creatable(application);
160 //
161 // void* m_pnativeapp;
162 //
163 // ::string m_strNetworkingApplicationHostname;
164 // //class application_impl * m_pappimpl;
165 //
166 // // 2020-01-25: removing from ::apex::system, placing here (at ::handler_context)
167 // // 2020-07-23: now at ::application
168 // ::pointer<::user::language_map> m_puserlanguagemap;
169 //
170 // //::pointer<::apex::application> m_pappParent;
171 // string m_strBaseSupportId;
172 // string m_strDatabaseAppId;
173 // string m_strRelativeFolder;
174 // string m_strInstallTraceLabel;
175 // string m_strInstallBuild;
176 // string m_strHttpUserAgentToken;
177 // string m_strHttpUserAgentVersion;
178 // bool m_bRequiresInstallation;
179 //
180 // bool m_bReadStringTable;
181 //
182 // ::pointer<class ::application_menu> m_papplicationmenu;
183 // //::pointer<::apex::menu> m_pmainmenu;
184 //
185 // //::pointer<::game::game> m_pgame;
186 //
187 // ::pointer<::user::interaction_base> m_puiCurrent;
188 // bool m_bContextTheme;
189 //
190 // // #if defined(LINUX) || defined(FREEBSD) || defined(OPENBSD)
191 // // bool m_bSnLauncheeSetup;
192 // // #endif
193 // //semaphore m_semCompiler;
194 // // former ::application_interface // moved on 2015-05-23 Sammstag while listening to RocketBeansTV (a German channel?) at TwitchTV
195 // string_array_base m_straActivationMessage;
196 //
197 // ::u32 m_dwInstallGoodToCheckAgain;
198 //
199 // bool m_bAppHasInstallerProtected;
200 // bool m_bAppHasInstallerChangedProtected;
201 // ::pointer<::install::installer> m_pinstaller;
202 //
203 // particle_address_array m_particleaddressaEventHook;
204 //
205 // bool m_bAttendedFirstRequest;
206 //
207 // //bool m_bAgreeExit;
208 // //bool m_bAgreeExitOk;
209 // //bool m_bFranceExit;
210 //
211 // bool m_bEnableAutoStartOption;
212 // bool m_bInterprocessCommunication;
213 // ::pointer<::interprocess::communication> m_pinterprocesscommunication;
214 // ::pointer<::interprocess::handler> m_pinterprocesshandler;
215 // //::pointer<service> m_pservice;
216 //
217 // //::string_array_base m_straInterprocessCommunicationPendingHandleUri;
218 //
219 //
220 // // apex commented
221 // //::pointer < ::mutex > m_pmutexFrame;
222 // //::pointer<::user::interaction_pointer_array> m_puiptraFrame;
223 //
224 // enum_thread_context m_ethreadcontextClose;
225 //
226 // enum_exclusive_instance m_eexclusiveinstance;
227 //
228 // bool m_bService;
229 //
230 // bool m_bUpdateMatterOnInstall;
231 //
232 // //::user::interaction * m_puiMainContainer;
233 //
234 // string_table_base m_stringtable;
235 // string_table_base m_stringtableStd;
236 // atom_map_base<string> m_stringmap;
237 //
238 // atom_map_base<::pointer<::channel>> m_mapNotify;
239 //
240 // string m_strLicense;
241 //
242 // ::i32 m_iWaitCursorCount; // for wait cursor (>0 => waiting)
243 //
244 // //::pointer<::simpledb::server> m_psimpledb;
245 //
246 // //::userex::pane_tab_impact * m_pmainpane;
247 //
248 //
249 // string m_strHelpFilePath;
250 //
251 // //#ifdef WINDOWS
252 // //
253 // // HGLOBAL m_hDevMode; // printer Dev Mode
254 // // HGLOBAL m_hDevNames; // printer Device Names
255 // //
256 // //#endif
257 //
258 // ::u32 m_dwPromptContext; // help action_context override for message box
259 // // LKG
260 // ::u32 m_dwPolicies; // block for storing boolean system policies
261 //
262 // // Support for Shift+F1 help mode.
263 // // true if we're in SHIFT+F1 mode.
264 // bool m_bHelpMode;
265 //
266 // //::userex::pane_tab_impact * m_ppaneimpactMain;
267 //
268 // string m_strProfileName;
269 //
270 // //#ifdef WINDOWS
271 // // ATOM m_atomApp;
272 // // ATOM m_atomSystemTopic; // for DDE open
273 // //#endif
274 //
275 // ::u32 m_nNumThumbnailPages; // number of default printed pages
276 //
277 // string m_strId;
278 //
279 // ::i32 m_iResourceId;
280 //
281 // //::pointer<::experience::department> m_pexperience;
282 // //::pointer<::apex::theme> m_ptheme;
283 //
284 //
285 // string_array_base m_straAppInterest;
286 //
287 // ::pointer<::service_handler> m_pservicehandler;
288 //
289 // ::pointer<::networking::application> m_p_networkingapplication;
290 //
291 // ::string_map_base<::pointer<::fs::folder_sync>> m_fsfoldersyncmap;
292 //
293 //
294 // };
295
296
297 class CLASS_DECL_ACME apex_application_layer
298 {
299 public:
300
301
302 virtual ::file::path cloud_protocol();
303
304
305
306 //void on_initialize_application(::main* pmain) override;
309
310
311 virtual string __get_text(const ::scoped_string & scopedstr);
312
313
314 ::pointer<::fs::folder_sync> fs_folder_sync(const ::scoped_string& scopedstr);
315
316
317 //virtual void process_command_line(command_line* pcommandline);
318
319 virtual ::string getResourceName(::i32 iId);
320 virtual void setResourceName(::i32 iId, const ::scoped_string & scopedstr);
321 virtual ::i32 getResourceId(const ::scoped_string & scopedstr);
322 //virtual ::user::style* get_user_style() const;
323 //virtual bool app_data_get(const ::atom & atom, stream & os) override;
324 //virtual bool app_data_set(const ::atom & atom, stream & is) override;
325
326 //virtual bool app_data_set(const ::atom & atom, object & obj) override;
327 //virtual bool app_data_get(const ::atom & atom, object & obj) override;
328
329 // virtual void interactive_credentials(::account::credentials * pcredentials) override;
330
331 //virtual ::database::key calc_data_key() override;
332
333
334 //virtual string load_podata(const ::scoped_string & scopedstrLang, bool bOnlyHeader);
335
336 //virtual string load_string(const ::atom& atom);
337
338
339 //virtual bool load_string(string& str, const ::atom& atom);
340
341
342 virtual void load_string_table();
343
344
345 virtual bool load_cached_string(string& str, const ::atom& atom, bool bLoadStringTable);
346
347
348 virtual bool load_cached_string_by_id(string& str, const ::atom& atom, bool bLoadStringTable);
349
350
351 virtual void load_string_table(const ::scoped_string & scopedstrApp, const ::scoped_string & scopedstrId);
352
353
354 virtual ::string fetch_public_internet_domain_extension_list_text();
355
356 // virtual bool is_application() const override;
357 //
358 //
359 // virtual bool is_system() const override;
360 //
361 //
362 // virtual bool is_session() const override;
363
364
365 virtual bool is_service();
366
367
368 virtual bool is_user_service();
369
370
371 virtual ::pointer<::service> create_service();
372
373
374 virtual void on_service_request(::request* prequest);
375
376
377 //virtual ::simpledb::server * simpledb();
378 virtual ::database::server* dataserver();
379
380
381 //virtual void verb();
382
383
384 //virtual bool Ex2OnAppInstall();
385
386
387 //virtual bool Ex2OnAppUninstall();
388
389
390 //virtual void init_application();
391
392 // void init1() override;
393 //
394 //
395 // void init2() override;
396 //
397 //
398 // void init3() override;
399 //
400 //
401 // void init() override;
402 //
403 //
404 // void init_instance() override;
405
406
407 virtual ::interprocess::communication * interprocess_communication();
408
409
410 // virtual void run() override;
411 //
412 //
413 // //virtual void main() override;
414 // virtual void on_run();
415
416
417 // void destroy() override;
418 //
419 //
420 // //virtual bool initial_check_directrix() override;
421 // void os_native_bergedge_start() override;
422 //
423
424 //virtual bool on_application_menu_action(const ::scoped_string & scopedstrCommand);
425
426
427 // void term() override;
428 //
429 //
430 // void term_application() override;
431 //
432
433 virtual void show_about_box(::user::activation_token * puseractivationtoken);
434
435
436 virtual ::pointer<::innate_ui::icon> innate_ui_icon(const ::i32_size& size);
437 virtual ::pointer<::innate_ui::icon> innate_ui_icon(const ::scoped_string & scopedstrIconUrl, const ::i32_size &size);
438
439
440
441 virtual void init_fs_set(::fs::set* pfsset);
442
443
444 //virtual bool InitApplication();
445
446
447 // void do_install() override;
448 //
449 //
450 // void do_uninstall() override;
451 //
452 //
453 // void on_install() override;
454 //
455 //
456 // void on_uninstall() override;
457
458
459 virtual void enable_service();
460
461
462 virtual void disable_service();
463
464
465 virtual void update_appmatter(::pointer<::sockets::http_session>& psession, const ::file::path & pathRoot,
466 const ::scoped_string & scopedstrRelative);
467
468
469 virtual void update_appmatter(::pointer<::sockets::http_session>& psession, const ::file::path & pathRoot,
470 const ::scoped_string & scopedstrRelative, const ::scoped_string & scopedstrLocale, const ::scoped_string & scopedstrStyle);
471
472
473 //virtual void SetCurrentHandles() override;
474
475 //virtual void france_exit();
476
477
478 //virtual void process_exception(const ::exception& e) override;
479
480
481 //virtual ::pointer<::apex::application>assert_running(const ::scoped_string & scopedstrAppId) override;
482
483 //virtual bool is_running();
484
485
486 //bool pump_runnable();
487
488 virtual void add_activation_message(const ::scoped_string & scopedstrMessage);
489
490
491 virtual bool has_activation_message() const;
492
493
494 virtual bool defer_process_activation_message();
495
496
497 //virtual void on_request(::request * prequest) override;
498
499
500 virtual bool assert_user_logged_in();
501
502
503 virtual string matter_as_string(const ::scoped_string & scopedstrMatter, const ::scoped_string & scopedstrMatter2 = nullptr);
504
505
506 //virtual bool do_prompt_file_name(::payload & payloadFile, string nIDSTitle, ::u32 lFlags, bool bOpenFileDialog, ::user::impact_system * ptemplate, ::user::document * pdocument);
507 //virtual bool do_prompt_file_name(::payload& payloadFile, string nIDSTitle, ::u32 lFlags, bool bOpenFileDialog, ::user::impact_system* ptemplate, ::user::document* pdocument);
508 //user virtual bool do_prompt_file_name(::payload& payloadFile, string nIDSTitle, ::u32 lFlags, bool bOpenFileDialog, ::user::impact_system* ptemplate, ::user::document* pdocument);
509
510
511 //virtual void process_message_filter(::i32 code, ::message::message * pmessage) override;
512
513
514 virtual void DoWaitCursor(::i32 nCode); // 0 => restore, 1=> begin, -1=> end
515
516 virtual void _001PostTryCloseApplication();
517
518
519 virtual void _001CloseApplication();
520
521
522 virtual bool try_close_application();
523
524
525 virtual bool can_close_application();
526
527
528 virtual void close_application();
529
530
531 virtual string get_license_id();
532
533
534 //void process_init() override;
535
536
537 virtual string get_mutex_name_gen();
538
539
540 //virtual ::user::interaction * user_interaction_from_oswindow(::windowing::window * pwindow);
541
542
543 virtual void hotplugin_host_starter_start_sync(const ::scoped_string & scopedstrCommandLine, ::apex::application* papp,
544 hotplugin::host* phost, hotplugin::plugin* pplugin = nullptr);
545
546
547 virtual void hotplugin_host_host_starter_start_sync(const ::scoped_string & scopedstrCommandLine, ::apex::application* papp,
548 hotplugin::host* phost, hotplugin::plugin* pplugin = nullptr);
549
550
551 //virtual bool is_local_data() override;
552
553 virtual class ::application_menu* application_menu();
554
555
556 virtual ::file::path appconfig_folder();
557
558
561
562
563 //virtual bool app_data_set(const ::atom & atom, stream & os);
564 //virtual bool app_data_get(const ::atom & atom, stream & is);
565
566 virtual bool app_data_set(const ::atom& atom, ::object& obj);
567
568
569 virtual bool app_data_get(const ::atom& atom, ::object& obj);
570
571
572 //void install_message_routing(::channel* pchannel) override;
573
574
575 virtual string dialog_box(const ::scoped_string & scopedstrMatter, ::property_set& propertyset);
576
577
578 virtual void application_menu_update();
579
580
581 //virtual string calc_data_key();
582
583
584 //virtual void notify_changed(const ::atom & atom, const ::action_context & action_context);
585
586
587 virtual ::file::path local_application_path();
588
589
590 virtual ::file::path local_application_home_path();
591
592
593 //virtual void destroy() override;
594
595
596 //virtual void release_parents() override;
597 //::property_object* parent_property_set_holder() const override;
598
599
600 //virtual bool is_set_finish() const override;
601
602
603 //virtual void on_change_theme();
604
605
606 //virtual string get_theme();
607
608
609 //virtual bool start_application(::request * prequest);
610
611
612 //virtual void release_children() override;
613 //virtual void merge_command_line(::create * pcommand);
614
615 // virtual void merge(::handler * phandler);
616
617 //virtual void record(::create * pcommand);
618
619 //virtual void on_event(::u64 u, ::particle * pparticle) override;
620 //virtual ::pointer<::thread_toolset>create_thread_toolset(::enum_task_tool etool);
621
622
627 //virtual void auto pmessageboxpayload = __initialize_new ::message_box_payload(::user::interaction_base * puiOwner, const ::scoped_string & scopedstrMessage, const ::scoped_string & scopedstrTitle = nullptr, const ::user::e_message_box & emessagebox = ::user::e_message_box_ok, ::callback callback = ::callback());
628
629 //send(pmessageboxpayload);
630
631
632 //virtual void ui_message_box(::user::interaction_base * puiOwner, const ::scoped_string & scopedstrMessage, const ::scoped_string & scopedstrTitle = nullptr, const ::user::e_message_box & emessagebox = ::user::e_message_box_ok, ::callback callback = ::callback());
633 //virtual void ui_message_box_timeout(::user::interaction_base * puiOwner, const ::scoped_string & scopedstrMessage, const ::scoped_string & scopedstrTitle = nullptr, const class ::time& timeTimeOut = time::infinite(), const ::user::e_message_box & emessagebox = ::user::e_message_box_ok, ::callback callback = ::callback());
634
635
636 //using ::platform::context::message_box;
637 //virtual void message_box(::user::interaction_base * puiOwner, const ::scoped_string & scopedstrMessage, const ::scoped_string & scopedstrTitle = nullptr, const ::user::e_message_box & emessagebox = ::user::e_message_box_ok, ::callback callback = ::callback());
638 //virtual void message_box_timeout(::user::interaction_base * puiOwner, const ::scoped_string & scopedstrMessage, const ::scoped_string & scopedstrTitle = nullptr, const class ::time& timeTimeOut = time::infinite(), const ::user::e_message_box & emessagebox = ::user::e_message_box_ok, ::callback callback = ::callback());
639
640
641 virtual void on_file_new();
642
643
644 virtual string title();
645
646
647 virtual string_array_base get_categories();
648
649
650 virtual void defer_create_keyboard();
651
652
653 //virtual bool set_keyboard_layout(const ::scoped_string & scopedstrPath, const ::action_context & action_context);
654
655
656 virtual bool enable_application_events(::particle* pparticle, bool bEnable);
657
658
659 virtual bool is_equal_file_path(const ::file::path& path1, const ::file::path& path2);
660
661
662 //virtual bool process_exception(const ::exception & e) override;
663
664
665 void set_has_installer(bool bSet);
666
667
668 //virtual ::file::path defer_process_path(::file::path path);
669 //virtual ::file::path full_process_path(::file::path path);
670
671 //virtual void DoWaitCursor(::i32 nCode); // 0 => restore, 1=> begin, -1=> end
672 //virtual void show_wait_cursor(bool bShow = true);
673
674
675 //virtual void process_message_filter(::i32 code,::message::message * pmessage) override;
676
677 //virtual void on_thread_on_idle(::thread * pthread, ::i32 lCount) override;
678
679
680 virtual void app_set(const ::scoped_string & scopedstrPath, const ::scoped_string & scopedstrValue);
681
682
683 virtual string app_get(const ::scoped_string & scopedstrPath, const ::scoped_string & scopedstrDefault = "");
684
685
686 //virtual bool Ex2OnAppInstall();
687 //virtual bool Ex2OnAppUninstall();
688
689 //virtual bool on_application_menu_action(const ::scoped_string & scopedstrCommand);
690 //virtual void _001CloseApplication();
691
692 //virtual string get_license_id();
693
694 virtual string get_version();
695
696
697 //virtual ::pointer < ::interprocess::handler > create_interprocess_handler();
698
699 //virtual void process_init();
700 //void process_term() override;
701
702
703 //virtual void impl_process_init();
704 //virtual void impl_init1();
705 //virtual void impl_init2();
706 //virtual void impl_init3();
707
708 //virtual void impl_process_term();
709 //virtual void impl_term1();
710 //virtual void impl_term2();
711 //virtual void impl_term3();
712
713 //virtual void init1();
714 //virtual void init2();
715 //virtual void init3();
716
717 // void term1() override;
718 //
719 //
720 // void term2() override;
721 //
722 //
723 // void term3() override;
724 //
725 //
726 // virtual void init_task() override;
727
728 //
729 // //virtual void init_application();
730 // //virtual void term_application();
731 // virtual void term_task() override;
732 //
733 //
734 // //virtual void init_instance() override;
735 // void term_instance() override;
736 //
737
738 //virtual void init();
739 //virtual void term();
740
741 virtual void notify_process_init();
742
743
744 virtual void notify_init1();
745
746
747 virtual void notify_init2();
748
749
750 virtual void notify_init3();
751
752
753 virtual void notify_term3();
754
755
756 virtual void notify_term2();
757
758
759 virtual void notify_term1();
760
761
762 virtual void notify_process_term();
763
764
765 // virtual bool is_installing();
766 // virtual bool is_unstalling();
767
768 //virtual string get_version();
769 //virtual void run() override;
770 //virtual void main() override;
771 //virtual void on_run();
772
773 //void on_before_launching() override;
774
775
776 //virtual void os_native_bergedge_start();
777
778 // virtual void pre_run();
779 //virtual void application_pre_run();
780
781 //virtual void on_pos_run_thread() override;
782 //virtual void pos_run() override;
783 //virtual void application_pos_run() override;
784
785
786 //virtual bool InitApplication();
787 //virtual void TermApplication();
788
789 //virtual bool on_install();
790 //virtual bool on_uninstall();
791
792 virtual bool system_add_app_install(const ::scoped_string & scopedstrId, const ::scoped_string & scopedstrBuild);
793
794
795 //virtual void TermThread(HINSTANCE hInstTerm);
796
797 //virtual void SetCurrentHandles();
798
799 //virtual void set_env_var(const string & payload,const string & value);
800 //virtual itask get_thread_id();
801
802
803 virtual bool _001OnDDECommand(const ::scoped_string & scopedstr);
804
805
806 virtual void _001InitializeShellOpen();
807
808
809 virtual void _001OnFileNew(::message::message* pmessage);
810
811
812 virtual void get_temp_file_name_template(string& str, const ::scoped_string & scopedstrName, const ::scoped_string & scopedstrExtension,
813 const ::scoped_string & scopedstrTemplate);
814
815
816 virtual void get_temp_file_name(string& str, const ::scoped_string & scopedstrName, const ::scoped_string & scopedstrExtension);
817
818
819 virtual ::service_handler* service_handler() ;
820
821 //virtual void on_service_request(::request * prequest);
822
823 //virtual bool is_running();
824
825 //virtual string get_mutex_name_gen();
826
827
828 void ___property_set_test_001();
829
830
833 virtual void on_exclusive_instance_conflict(::request* prequest, bool& bHandled,
834 enum_exclusive_instance eexclusive, const ::scoped_string & scopedstrId);
835
836
839 virtual void on_exclusive_instance_local_conflict(::request* prequest, bool& bHandled);
840
841
844 virtual void on_exclusive_instance_local_conflict_id(::request* prequest, bool& bHandled, const ::scoped_string & scopedstrId);
845
846
847 virtual void on_exclusive_instance_global_conflict(::request* prequest, bool& bHandled);
848
849
852 virtual void on_additional_local_instance(bool& bHandled, const ::scoped_string & scopedstrModule, ::i32 iPid, const ::scoped_string & scopedstrCommandLine);
853
854
855 virtual void on_new_instance(const ::scoped_string & scopedstrModule, const ::atom& idPid);
856
857
858 virtual string get_local_mutex_id();
859
860
861 virtual string get_global_mutex_id();
862
863
864 //virtual ::pointer< ::mutex > get_local_mutex();
865 //virtual ::pointer< ::mutex > get_global_mutex();
866
867 virtual string get_local_mutex_name();
868
869
870 virtual string get_local_id_mutex_name();
871
872
873 virtual string get_global_mutex_name();
874
875
876 virtual string get_global_id_mutex_name();
877
878
879 virtual bool check_exclusive(bool& bHandled);
880
881
882 virtual bool erase_exclusive(const ::scoped_string & scopedstrId);
883
884
885 virtual bool exclusive_fails(const ::scoped_string & scopedstr, security_attributes* psecurityattributes = nullptr);
886
887
888 virtual bool exclusive_erase(const ::scoped_string & scopedstr);
889
890
891 virtual void release_exclusive();
892
893
894 // bool on_set_scalar(enum_scalar escalar, ::number::number number, ::i32 iFlags) override;
895 //
896 //
897 // ::number::number get_scalar_minimum(enum_scalar escalar) override;
898 //
899 //
900 // ::number::number get_scalar(enum_scalar escalar) override;
901 //
902 //
903 // ::number::number get_scalar_maximum(enum_scalar escalar) override;
904
905
906 //bool safe_is_running();
907
908
909 //virtual void on_request(::request * prequest) override;
910
911 // name by Mummi (Japanese -> Guddo : from English : Good, ca2 interpretation : Goods).
912 // get/set serializables to user directory
913 //template < typename TYPE >
914 //bool gudo_get(const ::scoped_string & scopedstrKey, TYPE & t);
915
916 //template < typename TYPE >
917 //bool gudo_set(const ::scoped_string & scopedstrKey, const TYPE & t);
918
919
920 //virtual bool assert_user_logged_in();
921
922 //void request(::request* prequest) override;
923
924
925 //virtual void call_request(::request * prequest) override;
926
927
928 //virtual void process_message(::user::message * base) override;
929
930 //virtual void message_handler(::message::message* pmessage) override;
931
932
933 virtual string http_get_locale_schema(const ::scoped_string & scopedstrUrl, const ::scoped_string & scopedstrLocale,
934 const ::scoped_string & scopedstrSchema);
935
936
937 //virtual void on_update_matter_locator() override;
938
939 virtual bool platform_open_by_file_extension(::collection::index iEdge, const ::scoped_string & scopedstrPathName,
940 ::request* prequest = nullptr);
941
942
943 virtual bool platform_open_by_file_extension(::collection::index iEdge, ::request* prequest);
944
945
946 virtual bool on_start_application();
947
948
949 //#if !defined(LINUX)
950 //
951 // virtual bool os_on_start_application();
952 //
953 //#endif
954
955 // DECLARE_MESSAGE_HANDLER(on_message_app_exit);
956 //
957 //
958 // DECLARE_MESSAGE_HANDLER(on_message_close);
959 //
960 //
961 // DECLARE_MESSAGE_HANDLER(on_command_display_about);
962 //
963
964 //virtual bool _001OnAgreeExit();
965
966
967 //virtual void request_exit_application();
968 //virtual void can_exit_application();
969 //void exit_application() override;
970
971
972 //virtual void _001FranceExit();
973
974
975 //virtual string lstr(const ::atom & atom, const ::scoped_string & scopedstrDefault = "") override;
976
977
978 //virtual bool do_install();
979 //virtual bool do_uninstall();
980
981
982 //void request(::create * pcommand) override;
983 //void on_create(::request * prequest) override;
984
985 // virtual void dispatch_user_message(::user::message * pusermessage);
986
987 //virtual void throw_not_installed();
988
989 //virtual void play_audio(::payload payloadFile, bool bSynch = false);
990
991 virtual void post_critical_error_message(const ::scoped_string & scopedstrMessage, bool bShowLog = true);
992
993
994 virtual void show_critical_error_log();
995
996
997 virtual string get_app_user_friendly_task_bar_name();
998
999
1000 //void signal(::signal * psignal) override;
1001 //void handle(::topic * ptopic, ::handler_context * phandlercontext) override;
1002
1003 //virtual bool compress_ungz(::file::file * pfileUncompressed, ::file::file * pfileCompressed);
1004
1005 //virtual bool compress_gz(::file::file * pfileCompressed, ::file::file * pfileUncompressed, ::i32 iLevel = 6);
1006
1007 //virtual void interactive_credentials(::account::credentials * pcredentials) override;
1008
1009 virtual ::file::path get_executable_path();
1010
1011
1012 virtual string get_executable_extension();
1013
1014
1015 virtual string get_executable_title();
1016
1017
1018 virtual string get_executable_appid();
1019
1020
1021 virtual bool on_open_document_file(::payload payloadFile);
1022
1023
1024 virtual string get_app_id(string wstr);
1025
1026
1027 virtual void install_trace(const ::scoped_string & scopedstr);
1028
1029
1030 virtual void install_trace(::f64 dRate);
1031
1032
1033 virtual void register_application_as_spa_file_type_handler();
1034
1035
1036 //virtual bool low_is_app_app_admin_running(const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrConfiguration);
1037 //virtual void defer_start_program_files_app_app_admin(const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrConfiguration);
1038 // virtual void start_program_files_app_app_admin(const ::scoped_string & scopedstrPlatform, const ::scoped_string & scopedstrConfiguration);
1039
1040
1041 virtual bool keyboard_focus_is_focusable(const ::user::interaction_base* pue);
1042
1043
1044 virtual bool keyboard_focus_OnSetFocus(::user::interaction_base* pue);
1045
1046
1047 //virtual ::user::interaction * main_window();
1048
1049 // virtual ::pointer<::user::message>get_message_base(MESSAGE * pmsg) override;
1050
1051
1052 //virtual bool get_frame(::pointer<::user::interaction>& pinteraction);
1053 //virtual void add_frame(::user::interaction * puserinteraction);
1054 //virtual void erase_frame(::user::interaction * puserinteraction);
1055
1056 virtual void send_message_to_windows(::user::enum_message eusermessage, ::wparam wparam, ::lparam lparam); // with tbs in <3
1057
1058 virtual void route_message_to_windows(::message::message* pmessage); // with tbs in <3
1059
1060
1061 virtual void send_language_change_message();
1062
1063
1064 // apex commented
1065 //virtual LPWAVEOUT waveout_open(::i32 iChannel, LPAUDIOFORMAT pformat, LPWAVEOUT_CALLBACK pcallback);
1066
1067
1068 virtual string preferred_experience();
1069
1070
1071 // user virtual ::user::document * place_hold(::user::interaction * pinteraction);
1072
1073
1074 virtual void post_message(::user::enum_message eusermessage, ::wparam wparam = {}, ::lparam lparam = {});
1075
1076
1077 //virtual ::image::icon * set_icon(object * pparticle, ::image::icon * picon, bool bBigIcon);
1078
1079 //virtual ::image::icon * get_icon(object * pparticle, bool bBigIcon) const;
1080
1081 //virtual void handle(::topic * ptopic, ::handler_context * phandlercontext);
1082
1083
1084 // virtual ::account::user * get_user(::file::path pathUrl = nullptr, bool bFetch = false, bool bInteractive = true);
1085 //
1087 //
1088 // virtual ::account::user * noninteractive_get_user(::file::path pathUrl = nullptr);
1089
1090 //virtual void on_initial_frame_position(::user::frame_interaction * pframe);
1091
1092 //virtual void on_graphics_ready();
1093
1094 //virtual ::platform::type user_default_controltype_to_typeinfo(::user::enum_control_type econtroltype);
1095 // apex commented
1096 //virtual ::platform::type control_type_from_id(const ::atom & atom, ::user::enum_control_type & econtroltype);
1097
1098
1099 //virtual ::atom translate_property_id(const ::atom & atom) override;
1100 //virtual property fetch_property(const ::atom & atom) override;
1101
1102 //virtual void get_time(micro_time * pmicrotime);
1103
1104
1105 virtual void close(::enum_exit eexit);
1106
1107
1108 //user virtual ::pointer<::user::document>defer_create_impact(const ::scoped_string & scopedstrImpact, ::user::interaction * puiParent, e_window_flag ewindowflag, const ::atom & atom = nullptr);
1109
1110
1111 virtual void HideApplication();
1112
1113
1114 //virtual void initialize(::particle * pparticle) override;
1115
1116 //virtual void process_init() override;
1117
1118 //virtual void init1() override; // first initialization
1119 //virtual void init2() override; // second initialization
1120 //virtual void init3() override; // third initialization and so on...
1121
1122 //virtual void init() override; // last initialization
1123
1124 //virtual void bergedge_start();
1125 //virtual void os_native_bergedge_start() override;
1126
1127 //virtual void term_application() override;
1128
1129 //virtual void term() override;
1130
1131 //virtual void main() override;
1132
1133 //virtual ::application * get_app() const override;
1134
1135
1136 //virtual ::u32 guess_code_page(const ::scoped_string & scopedstr);
1137
1138 //virtual ::i32 _sync_message_box(::user::interaction_base* puiOwner, const ::scoped_string & scopedstrMessage, const ::scoped_string & scopedstrTitle, ::u32 fuStyle) override;
1139
1140
1141 //virtual void pre_translate_message(::message::message* pmessage) override;
1142
1143
1144 //virtual void install_message_routing(::channel* pchannel) override;
1145
1146
1147 //virtual void EnableShellOpen();
1148
1149
1150 //virtual void _001CloseApplication() override;
1151
1152
1153 //user virtual void on_create_split_impact(::user::split_impact* pimpact);
1154
1155
1156 //virtual ::platform::type control_type_from_id(const ::atom& atom, ::user::enum_control_type& econtroltype) override;
1157
1158
1159 // virtual bool base_support();
1160
1161 //virtual string sync_message_box(const ::scoped_string & scopedstrMatter,::property_set & propertyset) override;
1162
1163
1164 //virtual ::pointer<::user::interaction>uie_from_point(const ::i32_point& point);
1165
1166 //virtual bool on_application_menu_action(const ::scoped_string & scopedstrCommand) override;
1167
1168 //virtual bool on_install() override;
1169 //virtual bool on_uninstall() override;
1170 virtual bool on_run_install();
1171
1172
1173 virtual bool on_run_uninstall();
1174
1175
1176 // DECLARE_MESSAGE_HANDLER(on_application_signal);
1177 //
1178 //
1179 // DECLARE_MESSAGE_HANDLER(_001OnSwitchContextTheme);
1180
1181
1182 // open named file, trying to match a regsitered
1183 // document template to it.
1184 //virtual void on_request(::create* pcreate) override;
1185
1186 //for implementation
1187 virtual bool on_idle(::i32 lCount); // return tr(ue if more idle processing
1188 //virtual void process_window_procedure_exceptionconst ::exception& e, ::message::message* pmessage) override;
1189
1190
1191 // void EnableModelessEx(bool bEnable);
1195 // bool GetResourceData(::u32 nID, const ::scoped_string & scopedstrType, memory& storage);
1196
1197 //#ifdef WINDOWS
1198 // virtual bool OnMessageWindowMessage(MESSAGE * pmsg);
1199 //
1200 //#elif defined(LINUX)
1201 // virtual bool OnX11WindowMessage(void* pev);
1202 //#endif
1203
1204 //bool CreateFileFromRawResource(::u32 nID, const ::scoped_string & scopedstrType, const ::scoped_string & scopedstrFilePath);
1205
1206 //virtual LRESULT GetPaintMsgProc(::i32 nCode, WPARAM wParam, LPARAM lParam);
1207
1208
1209 //void OnUpdateRecentFileMenu(::message::command* pcommand);
1210
1211 //virtual void send_app_language_changed();
1212 //void route_command(::message::command* pcommand, bool bRouteToKeyDescendant = false) override;
1213
1214
1215 //virtual pointer< ::extended::future < ::conversation > > message_box(::user::interaction * puserinteraction, const ::scoped_string & scopedstrMessage, const ::scoped_string & scopedstrTitle = nullptr, const ::user::e_message_box & emessagebox = ::user::e_message_box_ok) override;
1216 //virtual ::enum_dialog_result message_box_timeout(const ::scoped_string & scopedstrMessage, const ::scoped_string & scopedstrTitle = nullptr, const class time & timeTimeout = ::time::infinite(), const ::user::e_message_box & emessagebox = ::user::e_message_box_ok, const ::future & future = ::future()) override;
1217
1218
1219 //void EnableHtmlHelp();
1220
1221
1222 //virtual ::i32 sync_message_box_timeout(::user::interaction_base * puiOwner,::payload payload, const ::scoped_string & scopedstrTitle, class ::time timeTimeout,::u32 fuStyle = ::user::e_message_box_ok) override;
1223 //virtual ::i32 sync_message_box(::user::interaction_base * puiOwner,const ::scoped_string & scopedstrMessage, const ::scoped_string & scopedstrTitle, ::u32 fuStyle = ::user::e_message_box_ok) override;
1224
1225
1226 //bool on_exclusive_instance_conflict(bool & bHandled, enum_exclusive_instance eexclusive, const ::scoped_string & scopedstrId) override;
1227
1228 //virtual bool process_exception(const ::exception & e) override;
1229
1230 //virtual bool on_uninstall() override;
1231
1232 //virtual bool on_install() override;
1233
1234
1235 //::user::document* place_hold(::user::interaction* pinteraction) override;
1236
1237
1238 //virtual bool on_install() override;
1239 //virtual bool on_application_menu_action(const ::scoped_string & scopedstrCommand) override;
1240
1241
1242 //virtual ::pointer<::user::menu_interaction>create_menu_button(::user::style_pointer & pstyle,::menu::item * pitem) override;
1243
1244 // set regsitry key name to be used by application's
1245 // profile member functions; prevents writing to an INI spfile->
1246 //void SetRegistryKey(const ::scoped_string & scopedstrRegistryKey);
1247
1248 //void SetRegistryKey(::u32 nIDRegistryKey);
1249
1250
1251 //void RegisterShellFileTypes(bool bCompat = false);
1252
1254 //void UnregisterShellFileTypes();
1255
1256 //
1257 //#ifdef WINDOWS
1258 // // Printer DC Setup routine, 'struct tagPD' is a PRINTDLG structure.
1259 // void SelectPrinter(HANDLE hDevNames, HANDLE hDevMode, bool bFreeOld = true);
1260 //#endif
1261
1262 // create a DC for the system default printer.
1263 //::draw2d::graphics* CreatePrinterDC();
1264
1265
1266 // bool GetPrinterDeviceDefaults(PRINTDLG* pPrintDlg);
1267
1268 // run this cast as an embedded object.
1269 //bool RunEmbedded();
1270
1271 // run this cast as an OLE automation server.
1272 //bool RunAutomated();
1273
1274 // Parse the command line for stock options and commands.
1275 // void ParseCommandLine(CCommandLineInfo& rCmdInfo);
1276
1277 // React to a shell-issued command line directive.
1278 // bool ProcessShellCommand(CCommandLineInfo& rCmdInfo);
1279
1280 // Overridables
1281
1282
1283 // exiting
1284 virtual bool save_all_modified(); // save before exit
1285 //virtual void HideApplication() override;
1286 //virtual void close(::apex::e_end eend) override; // close documents before exiting
1287
1288 // Advanced: to override message boxes and other hooks
1289 //virtual ::i32 DoMessageBox(const ::scoped_string & scopedstrPrompt,::u32 nType,::u32 nIDPrompt);
1290
1291
1292 // Advanced: process async DDE request
1293 //virtual bool OnDDECommand(LPWSTR pszCommand);
1294
1295 void _001OnFileNew();
1296
1297
1298 void on_file_open();
1299
1300
1301 virtual bool does_launch_window_on_startup();
1302
1303
1304 virtual bool activate_app();
1305
1306
1307 virtual void initialize_contextualized_theme();
1308
1309
1310 virtual bool get_fs_size(string& strSize, const ::scoped_string & scopedstrPath, bool& bPending);
1311
1312
1313 virtual bool get_fs_size(::i64& i64Size, const ::scoped_string & scopedstrPath, bool& bPending);
1314
1315
1316 virtual void set_title(const ::scoped_string & scopedstrTitle);
1317
1318
1319 void update_app_interest();
1320
1321
1322 void ensure_app_interest();
1323
1324
1325 // virtual ::pointer<::apex::application>create_platform(::apex::session* psession);
1326
1327
1328 virtual ::pointer<::progress::real> show_progress(::user::interaction* puiParent, const ::scoped_string & scopedstrTitle,
1329 ::collection::count iProgressCount);
1330
1331
1332 virtual void userfs_init1();
1333
1334
1335 virtual void userfs_process_init();
1336
1337
1338 //void data_on_after_change(::database::client* pclient, const ::scoped_string& scopedstr,
1339 // ::topic* ptopic) override;
1340
1341
1342 virtual void report_error(const ::exception& e, const ::user::e_message_box & emessagebox, const ::scoped_string & scopedstrTopic);
1343
1344
1345 virtual void create_impact_system();
1346
1347
1348 virtual void on_song_added(const ::scoped_string & scopedstr);
1349
1350
1351 //string get_visual_studio_build();
1352
1353
1354 virtual string sound_path(const ::scoped_string & scopedstr);
1355
1356
1357 virtual string get_default_playlist_path();
1358
1359
1360 virtual string as_string(const ::payload& payload);
1361
1362#if defined(LINUX) || defined(__BSD__)
1363
1364 virtual string get_wm_class() const;
1365
1366#endif
1367
1368
1369 virtual void on_create_app_shortcut();
1370
1371
1372 virtual void create_app_shortcut();
1373
1374
1375 virtual class ::networking::application* networking_application(
1376 ::networking::application_handler* papplicationhandlerCreateNetworkApplication = nullptr);
1377
1378
1379 virtual void create_networking_application(const ::scoped_string& scopedstrHostName,
1380 ::networking::application_handler*
1381 papplicationhandlerCreateNetworkApplication = nullptr);
1382
1383
1384 //::e_status on_html_response(::networking::application_socket* psocket, ::string& strHtml, const ::scoped_string & scopedstrUrl,
1385 //const ::property_set& setPost) override;
1386
1387
1388 //bool _handle_uri(const ::scoped_string & scopedstrUri) override;
1389
1390
1391 //bool on_interprocess_handle(const ::scoped_string & scopedstrUri) override;
1392
1394
1395
1396 };
1397
1398
1399} // namespace platform
Definition atom.h:237
Definition lparam.h:9
Definition bbb_object.h:11
Definition particle.h:95
Definition payload.h:54
Definition application_apex.h:298
virtual void on_exclusive_instance_local_conflict(::request *prequest, bool &bHandled)
Definition application_apex.cpp:802
virtual void on_exclusive_instance_local_conflict_id(::request *prequest, bool &bHandled, const ::scoped_string &scopedstrId)
Definition application_apex.cpp:809
virtual void on_exclusive_instance_conflict(::request *prequest, bool &bHandled, enum_exclusive_instance eexclusive, const ::scoped_string &scopedstrId)
Definition application_apex.cpp:794
virtual void on_additional_local_instance(bool &bHandled, const ::scoped_string &scopedstrModule, ::i32 iPid, const ::scoped_string &scopedstrCommandLine)
Definition application_apex.cpp:822
Definition property_set.h:512
Definition request.h:61
Definition security_attributes.h:7
Definition wparam.h:10
include "thread/AutoLock.h"
Definition _forward_declaration.h:877