[EGIT] [website/www-content] master 01/01: Wiki page gdb.md changed with summary [fix the typo, backgrace -> backtrace] by Amitesh Singh
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=6f24d04b3f8aa01535db1beb1cea044db6f8c418 commit 6f24d04b3f8aa01535db1beb1cea044db6f8c418 Author: Amitesh Singh Date: Thu Sep 6 22:06:44 2018 -0700 Wiki page gdb.md changed with summary [fix the typo, backgrace -> backtrace] by Amitesh Singh --- pages/develop/debug/c/gdb.md.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/develop/debug/c/gdb.md.txt b/pages/develop/debug/c/gdb.md.txt index 0bd6f0e68..d7209c925 100644 --- a/pages/develop/debug/c/gdb.md.txt +++ b/pages/develop/debug/c/gdb.md.txt @@ -96,7 +96,7 @@ ERR<13088>:eo lib/eo/eo.c:605 _efl_object_call_resolve() in ../src/lib/efl/inter Thread 1 "debugging" received signal SIGABRT, Aborted. 0x73e998a0 in raise () from /usr/lib/libc.so.6 -(gdb) backgrace +(gdb) backtrace #0 0x73e998a0 in raise () from /usr/lib/libc.so.6 #1 0x73e9af09 in abort () from /usr/lib/libc.so.6 #2 0x7739ee25 in eina_log_print_unlocked (domain=, level=EINA_LOG_LEVEL_ERR, --
[EGIT] [apps/terminology] master 01/01: termptysave: remove dead code
billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=235e0d27a8e562ea5ae1cf2e87e179209fcb7a69 commit 235e0d27a8e562ea5ae1cf2e87e179209fcb7a69 Author: Boris Faure Date: Thu Sep 6 23:32:22 2018 +0200 termptysave: remove dead code --- src/bin/termptysave.c | 60 --- 1 file changed, 60 deletions(-) diff --git a/src/bin/termptysave.c b/src/bin/termptysave.c index f483212..558228f 100644 --- a/src/bin/termptysave.c +++ b/src/bin/termptysave.c @@ -2,44 +2,6 @@ #include #include "termpty.h" #include "termptysave.h" -#include - -#if defined (__MacOSX__) || (defined (__MACH__) && defined (__APPLE__)) -# ifndef MAP_ANONYMOUS -# define MAP_ANONYMOUS MAP_ANON -# endif -#endif - -#define MEM_ALLOC_ALIGN 16 -#define MEM_BLOCKS 1024 - -#define TS_MMAP_SIZE 131072 -#define TS_ALLOC_MASK (TS_MMAP_SIZE - 1) - -typedef struct _Alloc Alloc; - -struct _Alloc -{ - unsigned int size, last, count, allocated; - short slot; - unsigned char gen; - unsigned char __pad; -}; - - -#if 0 -static void * -_ts_new(int size) -{ - /* TODO: RESIZE rewrite that stuff */ - //void *ptr; - - if (!size) return NULL; - //ptr = _alloc_new(size, cur_gen); - - return calloc(1, size); -} -#endif static void _ts_free(void *ptr) @@ -73,28 +35,6 @@ Termsave * termpty_save_extract(Termsave *ts) { if (!ts) return NULL; -#if 0 - if (ts->z) //TODO: unused - { -Termsavecomp *tsc = (Termsavecomp *)ts; -Termsave *ts2; -char *buf; -int bytes; - -ts2 = _ts_new(sizeof(Termsave) + ((tsc->wout - 1) * sizeof(Termcell))); -if (!ts2) return NULL; -ts2->w = tsc->wout; -buf = ((char *)tsc) + sizeof(Termsavecomp); -bytes = LZ4_uncompress(buf, (char *)(&(ts2->cells[0])), - tsc->wout * sizeof(Termcell)); -if (bytes < 0) - { - memset(&(ts2->cells[0]), 0, tsc->wout * sizeof(Termcell)); -// ERR("Decompress problem in row at byte %i", -bytes); - } -return ts2; - } -#endif return ts; } --
[EGIT] [core/efl] master 01/02: efl_ui_focus_manager: do not adjust values on a inactive manager
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bae53f7d72bb5b226f03f3b51d934a5531d41820 commit bae53f7d72bb5b226f03f3b51d934a5531d41820 Author: Marcel Hollerbach Date: Fri Aug 24 13:49:07 2018 + efl_ui_focus_manager: do not adjust values on a inactive manager The bug this fixes can be observed when opening elm_test with hoversel. The problem here is that the focus manager gets operations called on it after it is not active anymore, which lead to the fact that focus was restored on something that was about to be deleted. Differential Revision: https://phab.enlightenment.org/D6903 --- src/lib/elementary/efl_ui_focus_manager_calc.c | 73 ++ 1 file changed, 51 insertions(+), 22 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c index b36b2053e9..8f05d8a723 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.c +++ b/src/lib/elementary/efl_ui_focus_manager_calc.c @@ -89,6 +89,34 @@ static void dirty_add(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd, Node *dirty); static Node* _next(Node *node); static void _prepare_node(Node *root); +static Eina_Bool +_focus_manager_active_get(Eo *obj) +{ + Eo *root, *manager, *comp_parent, *redirect; + + if (efl_isa(obj, EFL_UI_FOCUS_MANAGER_WINDOW_ROOT_INTERFACE)) return EINA_TRUE; + + root = efl_ui_focus_manager_root_get(obj); + manager = efl_ui_focus_object_focus_manager_get(root); + + if (!manager) return EINA_FALSE; + + redirect = efl_ui_focus_manager_redirect_get(manager); + + if (!redirect) return EINA_FALSE; + + if (efl_composite_part_is(obj)) + comp_parent = efl_parent_get(obj); //a focus manager can be attached to something via composition + else + comp_parent = NULL; + + if (redirect == obj || + (redirect == comp_parent)) + return EINA_TRUE; + + return EINA_FALSE; +} + static void _manager_in_chain_set(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd) { @@ -795,30 +823,31 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_redirect_set(Eo *obj, Efl_Ui_Foc efl_ui_focus_manager_reset_history(old_manager); //adjust focus property of the most upper element - { - Node *n = NULL; + if (_focus_manager_active_get(obj)) + { +Node *n = NULL; - n = eina_list_last_data_get(pd->focus_stack); +n = eina_list_last_data_get(pd->focus_stack); - if (!pd->redirect && old_manager) -{ - if (n) - { -efl_ui_focus_object_focus_set(n->focusable, EINA_TRUE); - } - else - { -n = _request_subchild(pd->root); -if (n) - efl_ui_focus_manager_focus_set(obj, n->focusable); - } -} - else if (pd->redirect && !old_manager) -{ - if (n) - efl_ui_focus_object_focus_set(n->focusable, EINA_FALSE); -} - } +if (!pd->redirect && old_manager) + { + if (n) + { + efl_ui_focus_object_focus_set(n->focusable, EINA_TRUE); + } + else + { + n = _request_subchild(pd->root); + if (n) +efl_ui_focus_manager_focus_set(obj, n->focusable); + } + } +else if (pd->redirect && !old_manager) + { + if (n) + efl_ui_focus_object_focus_set(n->focusable, EINA_FALSE); + } + } efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_REDIRECT_CHANGED , old_manager); --
[EGIT] [core/efl] master 02/02: elementary: Check for valid focus manager before starting do loop
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=84423a465ca2254a38a28bf6e0c62342340d13ad commit 84423a465ca2254a38a28bf6e0c62342340d13ad Author: Chris Michael Date: Thu Sep 6 13:21:55 2018 + elementary: Check for valid focus manager before starting do loop Apparently there are cases where efl_ui_focus_object_focus_manager_get can return NULL. In order to trap for this, we can simply modify the do loop slightly and check for a valid manager before we actually start looping Test Case: elementary_test -to "Panel Scrollable" and click Toggle button ref T7030 Differential Revision: https://phab.enlightenment.org/D6704 --- src/lib/elementary/efl_ui_focus_util.c | 46 +++--- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_util.c b/src/lib/elementary/efl_ui_focus_util.c index aa342a92f4..b0b5bedd8c 100644 --- a/src/lib/elementary/efl_ui_focus_util.c +++ b/src/lib/elementary/efl_ui_focus_util.c @@ -31,26 +31,32 @@ _efl_ui_focus_util_focus(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Ui_Focus registered_manager = m = efl_ui_focus_object_focus_manager_get(user); entry = user; - do { - //check if the root of a manager is the window root, set focus to this object in the manager than - entry = efl_ui_focus_manager_root_get(m); - if (efl_isa(m, EFL_UI_WIN_CLASS)) - { - //we are at the root of the window, we can set the focus to the object - efl_ui_focus_manager_focus_set(registered_manager, user); - return; - } - - //if there is no manager yet, delay the focus setting until this entity gets registered for one chain - m = efl_ui_focus_object_focus_manager_get(entry); - if (!m) - { - //delayed focusung - efl_key_data_set(top, "__delayed_focus_set", entry); - efl_event_callback_add(entry, EFL_UI_FOCUS_OBJECT_EVENT_MANAGER_CHANGED, _manager_changed, user); - return; - } - } while (m); + do + { +if (m) + { + //check if the root of a manager is the window root, set focus to this object in the manager than + entry = efl_ui_focus_manager_root_get(m); + if (efl_isa(m, EFL_UI_WIN_CLASS)) + { + //we are at the root of the window, we can set the focus to the object + efl_ui_focus_manager_focus_set(registered_manager, user); + return; + } + } + +//if there is no manager yet, delay the focus setting until this entity gets registered for one chain +m = efl_ui_focus_object_focus_manager_get(entry); +if (!m) + { + //delayed focusung + efl_key_data_set(top, "__delayed_focus_set", entry); + efl_event_callback_add(entry, +EFL_UI_FOCUS_OBJECT_EVENT_MANAGER_CHANGED, +_manager_changed, user); + return; + } + } while (m); } EOLIAN static Efl_Ui_Focus_Manager* --
[EGIT] [core/efl] master 01/01: efl-mono: Make eina_list return the list
vitorsousa pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=40d03dbef8a0e16a0a41158a5300b16a51210852 commit 40d03dbef8a0e16a0a41158a5300b16a51210852 Author: Xavi Artigas Date: Thu Sep 6 12:10:51 2018 -0300 efl-mono: Make eina_list return the list Summary: eina_list_reverse() returns the list, the C# version should do the same. This fixes the reference/csharp/eina/src/eina_list.cs example. Fixes T7112 Test Plan: The eina_list.cs example works after this change. Reviewers: lauromoura, vitor.sousa, felipealmeida Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7112 Differential Revision: https://phab.enlightenment.org/D6995 --- src/bindings/mono/eina_mono/eina_list.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bindings/mono/eina_mono/eina_list.cs b/src/bindings/mono/eina_mono/eina_list.cs index e31a8ffed3..03c2ba90e7 100644 --- a/src/bindings/mono/eina_mono/eina_list.cs +++ b/src/bindings/mono/eina_mono/eina_list.cs @@ -299,9 +299,10 @@ public class List : IEnumerable, IDisposable return NativeToManaged(ele); } -public void Reverse() +public List Reverse() { Handle = eina_list_reverse(Handle); +return this; } public void Shuffle() --
[EGIT] [tools/examples] master 01/01: csharp: Comments in eina_value.cs
vitorsousa pushed a commit to branch master. http://git.enlightenment.org/tools/examples.git/commit/?id=accd628bd3ca9e31b11d8824005ac0439d1d780c commit accd628bd3ca9e31b11d8824005ac0439d1d780c Author: Xavi Artigas Date: Thu Sep 6 12:05:02 2018 -0300 csharp: Comments in eina_value.cs Reviewers: lauromoura, vitor.sousa, felipealmeida Reviewed By: vitor.sousa Differential Revision: https://phab.enlightenment.org/D6996 --- reference/csharp/eina/src/eina_value.cs | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/reference/csharp/eina/src/eina_value.cs b/reference/csharp/eina/src/eina_value.cs index f4ec556c..96e137a9 100644 --- a/reference/csharp/eina/src/eina_value.cs +++ b/reference/csharp/eina/src/eina_value.cs @@ -1,10 +1,9 @@ - /* * Eina Value examples. * * These examples demonstrate how to work with eina_value data and methods. * Eina_Value is a way to represent and pass data of varying types and to - * convert efficiently between them.. + * convert efficiently between them. * Eina_Value can even define structs for managing more complex requirements. */ @@ -22,7 +21,7 @@ public class Example int_val.Get(out i); Console.WriteLine("int_val value is {0}", i); -// It can easily be converted it to a string +// It can easily be converted to a string string str = int_val.ToString(); Console.WriteLine("int_val to string is \"{0}\"", str); int_val.Flush(); @@ -46,11 +45,11 @@ public class Example static void ValueConvert() { -// set up string and int types to convert between +// Set up string and int types to convert between var str_val = new eina.Value(eina.ValueType.String); var int_val = new eina.Value(eina.ValueType.Int32); -// convert from int to string: +// Convert from int to string: int i1; string str1; int_val.Set(123); @@ -59,7 +58,7 @@ public class Example str_val.Get(out str1); Console.WriteLine("int_val was {0}, converted to string is \"{1}\"", i1, str1); -// and the other way around! +// And the other way around! int i2; string str2; str_val.Set("33"); @@ -85,9 +84,6 @@ public class Example ValueConvert(); Console.WriteLine(""); -// TODO: FIXME -// ValueStruct(); - efl.All.Shutdown(); } } --
[EGIT] [tools/examples] master 01/01: Add Polling tutorial
vitorsousa pushed a commit to branch master. http://git.enlightenment.org/tools/examples.git/commit/?id=a473380cc78e2bbb79e2fce5b43114b0d211df33 commit a473380cc78e2bbb79e2fce5b43114b0d211df33 Author: Xavi Artigas Date: Thu Sep 6 11:46:02 2018 -0300 Add Polling tutorial Reviewers: lauromoura, vitor.sousa, felipealmeida Reviewed By: vitor.sousa Differential Revision: https://phab.enlightenment.org/D6991 --- reference/csharp/core/src/core_poll.cs | 51 ++ reference/csharp/core/src/meson.build | 7 + 2 files changed, 58 insertions(+) diff --git a/reference/csharp/core/src/core_poll.cs b/reference/csharp/core/src/core_poll.cs new file mode 100644 index ..a05e7b9d --- /dev/null +++ b/reference/csharp/core/src/core_poll.cs @@ -0,0 +1,51 @@ +/* + * Efl Core Poll examples. + * + * This example sets up poll callbacks for LOW, MEDIUM and HIGH frequency events. + * We run for 30 seconds and print to stdout to show when each is called. + * Depending on your system this may not include any LOW frequency polls. + */ + +using System; + +public class Example +{ +#if WIN32 +[STAThreadAttribute()] +#endif +public static void Main() +{ +// Initialize EFL and all UI components +efl.All.Init(); + +// Retrieve the application's main loop +var mainloop = efl.App.GetLoopMain(); + +// Register to all Poll events +mainloop.PollLowEvt += (object sender, EventArgs e) => { + Console.Write("L"); +}; +mainloop.PollMediumEvt += (object sender, EventArgs e) => { + Console.Write("M"); +}; +mainloop.PollHighEvt += (object sender, EventArgs e) => { + Console.Write("."); +}; + +// Use a timer to exit the application +new efl.Loop_Timer(mainloop, (efl.ILoop_Timer etimer) => { +// Trigger after 30s +etimer.SetInterval(30); +etimer.TickEvt += (object sender, EventArgs e) => { + Console.WriteLine("\nTIMER: timer callback called, exiting."); + mainloop.Quit(new eina.Value(0)); +}; +}); + +// Start the EFL main loop (and the experiment) +mainloop.Begin(); + +// Shutdown EFL +efl.All.Shutdown(); +} +} diff --git a/reference/csharp/core/src/meson.build b/reference/csharp/core/src/meson.build index 3235e712..e4a6f370 100644 --- a/reference/csharp/core/src/meson.build +++ b/reference/csharp/core/src/meson.build @@ -13,3 +13,10 @@ executable('efl_reference_core_idler', cs_args : efl_mono_libs, install : true ) + +executable('efl_reference_core_poll', + files(['core_poll.cs']), + dependencies : deps, + cs_args : efl_mono_libs, + install : true +) --
[EGIT] [website/www-content] master 01/01: Wiki page navigation changed with summary [Added Main Loop guide link] by Xavi Artigas
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=453da87f91cb6f9a08edff411853cca233f39de2 commit 453da87f91cb6f9a08edff411853cca233f39de2 Author: Xavi Artigas Date: Thu Sep 6 03:25:20 2018 -0700 Wiki page navigation changed with summary [Added Main Loop guide link] by Xavi Artigas --- pages/develop/navigation.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/develop/navigation.txt b/pages/develop/navigation.txt index b0093dabe..070ad2f34 100644 --- a/pages/develop/navigation.txt +++ b/pages/develop/navigation.txt @@ -46,6 +46,7 @@ * [[/develop/guides/c/ui/focus.md | UI Focus]] * [[/develop/guides/c/porting-guide.md | Legacy Porting Guide]] * [[/develop/guides/csharp/start.md | Programming Guides: Beta C# API]] +* [[/develop/guides/csharp/core/main-loop.md | Main Loop]] * [[/develop/guides/csharp/core/events.md | Events]] * [[/develop/legacy/api/c/ | Reference Guide: Stable API ]] * [[/develop/api/ | Reference Guide: Beta C API]] \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [Added Main Loop guide link] by Xavi Artigas
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=d0edc0db6e100ea7125446e2ab8dd5e781aed3ec commit d0edc0db6e100ea7125446e2ab8dd5e781aed3ec Author: Xavi Artigas Date: Thu Sep 6 03:23:57 2018 -0700 Wiki page start.md changed with summary [Added Main Loop guide link] by Xavi Artigas --- pages/develop/guides/csharp/start.md.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/develop/guides/csharp/start.md.txt b/pages/develop/guides/csharp/start.md.txt index fd03d82d4..05f03689f 100644 --- a/pages/develop/guides/csharp/start.md.txt +++ b/pages/develop/guides/csharp/start.md.txt @@ -16,4 +16,5 @@ This section of the Enlightenment Wiki offers reference guides for the most comm If you haven't done so yet, read the [Setting Up a C# Development Environment](/develop/setup/csharp/) guide so you have a working EFL installation with C# support. +* [Main Loop Programming Guide](core/main-loop.md) * [Events Programming Guide](core/events.md) --
[EGIT] [website/www-content] master 01/01: Wiki page main-loop.md changed with summary [created] by Xavi Artigas
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=c8dae61b45e6f56cdd8496d572e4ac30364d2814 commit c8dae61b45e6f56cdd8496d572e4ac30364d2814 Author: Xavi Artigas Date: Thu Sep 6 03:22:47 2018 -0700 Wiki page main-loop.md changed with summary [created] by Xavi Artigas --- pages/develop/guides/csharp/core/main-loop.md.txt | 145 ++ 1 file changed, 145 insertions(+) diff --git a/pages/develop/guides/csharp/core/main-loop.md.txt b/pages/develop/guides/csharp/core/main-loop.md.txt new file mode 100644 index 0..8d91e1b4d --- /dev/null +++ b/pages/develop/guides/csharp/core/main-loop.md.txt @@ -0,0 +1,145 @@ +--- +~~Title: Main Loop Programming Guide in C#~~ +~~NOCACHE~~ +--- + +# Main Loop Programming Guide in C# # + +The EFL is event-driven. This means that execution usually takes place within an internal EFL *Main Loop*. The application is notified through function callbacks of virtually any event happening on the computer. This is typically more efficient than *polling* for events, whereby the application has to repeatedly ask if a certain event has occurred. When nothing is happening (no events are pending) the main loop enters the *idle state* during which the CPU consumes very little power. + +EFL manages timers and user interface events amongst many other things and even provides a simple mechanism for applications to perform conventional data polling if required. + +## Prerequisites ## + +* Read the [Hello World in C#](/develop/tutorials/csharp/hello-world.md) tutorial to learn how to instantiate EFL objects. +* Read the [Events Programming Guide](events.md) to learn how to register callbacks, which can be triggered by events. + +## The Application Main Loop ## + +For convenience, when your application starts, EFL creates one Main Loop for you, called the *Application Main Loop*. You can use it as the parent for any object you create that requires a main loop (Like [Promises and Futures](/develop/guides/c/eina/futures.md), for example). + +In the [Hello World](/develop/tutorials/csharp/hello-world.md) tutorial you learned that you can retrieve the Application Main Loop like this: + +```csharp +var mainloop = efl.App.GetLoopMain(); +``` + +This guide will put the application's main loop to a variety of uses. + +## Timers ## + +Timers allow events to be triggered periodically after the given time has elapsed. After an event callback has been registered with the timer, it will be called at regular intervals. + +You can find usage examples in the [EFL examples repository](https://git.enlightenment.org/tools/examples.git): [`reference/csharp/core/src/core_idler.cs`](https://git.enlightenment.org/tools/examples.git/tree/reference/csharp/core/src/core_idler.cs) and [`reference/csharp/core/src/core_poll.cs`](https://git.enlightenment.org/tools/examples.git/tree/reference/csharp/core/src/core_poll.cs). + +### Creating and Destroying Timers ### + +Timers are EFL objects. You can create them with the `new` operator as all other EFL objects, with an optional parent and initialization method (as seen in the [Hello World in C#](/develop/tutorials/csharp/hello-world.md) tutorial): + +```c +var timer_object = new efl.Loop_Timer(mainloop, (efl.ILoop_Timer etimer) => { +// Timer configuration +}); +``` + +Timers do not need to have a parent. However it is convenient to create them under the application Main Loop, so the parent can manage destroying the timer. + +### The Timer Callback ### + +Register the callback using the `+=` operator as explained in the [Events Programming Guide](events.md), and the `TickEvt` event. + +```csharp +timer_object.TickEvt += (object sender, EventArgs e) => { + Console.WriteLine("TIMER: timer callback called"); +}; +``` + +The callback has the usual event handler signature: + +```csharp +void callback(object sender, EventArgs e); +``` + +This callback will be continuously triggered in the configured time intervals. + +### Configuring a Timer ### + +The `Interval` property controls the amount of time between callback triggers in **seconds**: + +```csharp +timer_object.SetInterval(0.01); // In seconds +timer_object.GetInterval(); +``` + +The **time left** before the next trigger of the timer can be retrieved through the `Pending` read-only property: + +```csharp +timer_object.GetPending(); +``` + +The current interval can be `Reset` with: + +```csharp +timer_object.Reset(); +``` + +The current interval can also be extended using `Delay()`, effectively delaying all future triggers of the timer by a given number of **seconds**: + +```csharp +timer_object.Delay(1); // In seconds +``` + +### Pausing a Timer ### + +Timers are paused by preventing them from emitting any events, as explained in the [Events Programming Guide](events.md). + +Pause a timer with: + +```csharp +timer_object.FreezeEvent(); +``` + +Resume from the previous time index: +
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [Added link to setup guide and BETA Warning] by Xavi Artigas
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=355a00d3c36553b25097c386cad2453b8a1a0926 commit 355a00d3c36553b25097c386cad2453b8a1a0926 Author: Xavi Artigas Date: Thu Sep 6 02:57:45 2018 -0700 Wiki page start.md changed with summary [Added link to setup guide and BETA Warning] by Xavi Artigas --- pages/develop/guides/csharp/start.md.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/pages/develop/guides/csharp/start.md.txt b/pages/develop/guides/csharp/start.md.txt index 9907e1fb0..fd03d82d4 100644 --- a/pages/develop/guides/csharp/start.md.txt +++ b/pages/develop/guides/csharp/start.md.txt @@ -7,7 +7,13 @@ This section of the Enlightenment Wiki offers reference guides for the most commonly-used features of the Enlightenment Foundation Libraries (EFL) and associated infrastructure. These guides are designed to supplement and support the step-by-step tutorials, which are written as a starting point for beginners who have not previously programmed using EFL. +| | WARNING | | +| --- | --- | --- | +| ![NOTE](/_media/note-important.png) | **The C# bindings are currently in BETA state**They should only be used for experimenting and **NOT** for any product development.The source code for the tutorials is subject to change in the future. | ![NOTE](/_media/note-important.png) | + > **NOTE:** > The guides in this section use the latest beta release of the API, as noted > in [Developing with the Enlightenment Foundation > Libraries](/develop/start.md#Current_vs._Beta). Versions of these guides > written for the current release can be found in the [Legacy section of the > website](/develop/legacy/program_guide/start). +If you haven't done so yet, read the [Setting Up a C# Development Environment](/develop/setup/csharp/) guide so you have a working EFL installation with C# support. + * [Events Programming Guide](core/events.md) --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [Add link to Setup guide] by Xavi Artigas
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=7f622b191bf3e30a36b3acfab3799b7edd9c8e6b commit 7f622b191bf3e30a36b3acfab3799b7edd9c8e6b Author: Xavi Artigas Date: Thu Sep 6 02:55:29 2018 -0700 Wiki page start.md changed with summary [Add link to Setup guide] by Xavi Artigas --- pages/develop/e/sandbox_gadgets.txt | 620 pages/develop/tutorials/csharp/start.md.txt | 8 +- 2 files changed, 5 insertions(+), 623 deletions(-) diff --git a/pages/develop/e/sandbox_gadgets.txt b/pages/develop/e/sandbox_gadgets.txt deleted file mode 100644 index d30a5005b..0 --- a/pages/develop/e/sandbox_gadgets.txt +++ /dev/null @@ -1,620 +0,0 @@ -~~Title: Creating Enlightenment Gadgets~~ - -# Creating Enlightenment Gadgets # - -*Gadgets* are standalone applications that Enlightenment can use as extensions to its desktop. They are similar to modules in that they can be placed in containers, called *gadget sites*; they differ in that they are not internal to Enlightenment and do not run in the same process. - -This process separation occurs through Enlightenment placing gadgets into a sandbox. This sandbox is a gadget visual that manages the necessary gadget requirements, in place of the application handling this. Sandboxing is beneficial to the user desktop experience as it encourages the creation of gadgets through a much easier development path while also protecting the user desktop experience from being interrupted by faulty extensions. - -This guide demonstrates how to develop these gadgets. - -## Prerequisites ## - -* Install and configure Enlightenment and the EFL with Wayland support: [Get Enlightenment](docs/distros/start). -* Create the Hello World program: [Get started with EFL](develop/efl/start). - -## Gadget Advantages and Limitations ## - -Creating gadgets directly, rather than as modules, reduces the need to call upon additional application programming interfaces (APIs). Gadgets are also more robust: as gadgets run in a separate process from Enlightenment they will not crash the desktop when encountering an error, instead gracefully recovering from their own crashes. - -There are, however, a few limitations for gadgets. It is not recommended to use forced sizes or size hints in the gadget application. The sandbox will manage sizing for the application; setting minimum or maximum sizes, resizing or moving objects will clash with how the sandbox is managing sizes. Simply setting the desired aspect for the application will tell the sandbox how it needs to prioritize the size of the application. - -Running additional applications from within the gadget application will also bring unintended results. The gadget lives in a sandbox and is bound by the size and space that the sandbox provides. If the gadget tries to open further windows or applications on its own these windows and applications will be restricted to the gadget visual. Fortunately, the sandbox provides smart callbacks than can be called to run external applications and also provides a method for opening further windows o [...] - -## Gadget Basics ## - -Enlightenment populates its list of gadgets by looking for ``.desktop`` files installed to the directory ``enlightenment/gadgets`` under Enlightenment's library directory, which can be found using ``pkg-config --variable=libdir enlightenment``. This gadget list is then made available for use through each gadget site's "Add Gadgets" popup. These popups display either a live view of the gadget or a still image. - -When Enlightenment executes the gadget application it sets the environment variable ``E_GADGET_ID``. This environmental variable is how the gadget application will determine if it is being run as a gadget, if it is being displayed in the "Add Gadget" popup or if it has been added to a gadget site and has a unique gadget ID. - -To demonstrate this, a modified version of the Hello World app referenced in the Prerequisites section of this guide is used. Note the following important change: in the original version the window is created using ``elm_win_util_standard_add()``, but in order to achieve transparency on the window for use as a gadget this is changed to ``elm_win_add()`` in this guide. - -In the ``elm_main()`` function the application can check for the ``E_GADGET_ID`` with the following code: - -```c -EAPI_MAIN int -elm_main(int argc, char **argv) -{ - Evas_Object *win, *btn; - int gadget =0, id_num = 0; - char buf[16]; - - elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); - - if (getenv("E_GADGET_ID")) - { -gadget = 1; -snprintf(buf, sizeof(buf), "%s", getenv("E_GADGET_ID")); -id_num = atoi(buf); - } - - win = elm_win_add(NULL, "Main", ELM_WIN_BASIC); - elm_win_title_set(win, "Hello, World!"); - elm_win_autodel_set(win, EINA_TRUE); - - if