main.c File Reference


Defines

#define WINW   800
#define WINH   600

Functions

Ecore_Evas * setup_ecore_evas (int wx, int wy, int ww, int wh, int fullscreen)
static int idler_before_cb (void *data)
static int idler_after_cb (void *data)
static char * get_my_hostname (void)
 get the hostname of the machine, surrounded by the before and after strings the config specifies
static int screensaver_notify_cb (void *data, int ev_type, void *ev)
 Called when the screensaver starts/stops.
static int exit_cb (void *data, int ev_type, void *ev)
 what to do if we SIGINT(^c) it
static void window_del_cb (Ecore_Evas *ee)
 what to do when we receive a window delete event
static void window_resize_cb (Ecore_Evas *ee)
 handle when the ecore_evas needs to be resized
static void focus_swap (Evas_Object *o, int selecto)
 swap key input focus between the password and user entries
static void interp_return_key (void *data, const char *str)
 when Enter is hit on the keyboard we end up here
static void focus (void *data, Evas_Object *o, const char *emission, const char *source)
 an edje signal emission
static void set_date (void *data, Evas_Object *o, const char *emission, const char *source)
 Set the "entrance.date" part's text.
static void set_time (void *data, Evas_Object *o, const char *emission, const char *source)
 Set the "entrance.time" part's text.
static void done_cb (void *data, Evas_Object *o, const char *emission, const char *source)
 Executed when an EntranceAuthSuccessDone signal is emitted.
void session_item_selected_cb (void *data, Evas_Object *o, const char *emission, const char *source)
 Executed when a Session is selected.
void user_selected_cb (void *data, Evas_Object *o, const char *emission, const char *source)
 Executed when a Session is selected.
void user_unselected_cb (void *data, Evas_Object *o, const char *emission, const char *source)
 Executed when a Session is unselected.
static void reboot_cb (void *data, Evas_Object *o, const char *emission, const char *source)
 Executed when an EntranceSystemReboot signal is emitted.
static void shutdown_cb (void *data, Evas_Object *o, const char *emission, const char *source)
 Executed when an EntranceSystemHalt signal is emitted.
static void _user_session_set (void *data, Evas_Object *o, const char *emission, const char *source)
 Executed when an SessionDefaultSet signal is emitted.
static void _container_scroll (void *data, Evas_Object *o, const char *emission, const char *source)
static void entrance_help (char **argv)
 print the "Help" associated with the app, shows cli args etc
int timer_cb (void *data)
 we handle this iteration outside of the theme, update date and time
static void screen_switch_cb (void *data, Evas_Object *obj, const char *signal, const char *source)
 When the pointer switches screens, this moves the widgets to the new screen.
int main (int argc, char *argv[])
 main - where it all starts !

Variables

static Entrance_Sessionsession = NULL
int ENTRANCE_DESKTOP_TYPE_XSESSION = -1

Detailed Description

When entrance starts, and ui specific variables

Define Documentation

#define WINH   600

#define WINW   800


Function Documentation

static void _container_scroll ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
) [static]

static void _user_session_set ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
) [static]

Executed when an SessionDefaultSet signal is emitted.

Parameters:
data - the Entrance_Session in context
o - the evas object(Edje) that created the signal
emission - the signal "type" that was emitted
source - the signal originated from this "part" Save out the current Entrance_Session's EntranceSession as the user's new default session to be executed when they log in.

static void done_cb ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
) [static]

Executed when an EntranceAuthSuccessDone signal is emitted.

Parameters:
data - the data passed when the callback was added
o - the evas object(Edje) that created the signal
emission - the signal "type" that was emitted
source - the signal originated from this "part" Ensure that the session is authed, and quit the main ecore_loop

static void entrance_help ( char **  argv  )  [static]

print the "Help" associated with the app, shows cli args etc

Parameters:
argv the argv that was passed from the application

static int exit_cb ( void *  data,
int  ev_type,
void *  ev 
) [static]

what to do if we SIGINT(^c) it

Parameters:
data - no clue
ev_type - kill event ?
ev - event data
Returns:
1 Obviously I want to exit here.

static void focus ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
) [static]

an edje signal emission

Parameters:
data - the data passed when the callback was added
o - the evas object(Edje) that created the signal
emission - the signal "type" that was emitted
source - the signal originated from this "part"

static void focus_swap ( Evas_Object *  o,
int  selecto 
) [static]

swap key input focus between the password and user entries

Parameters:
o - the object we want to swap focus with
selecto - whether to focus on o, or the other entry

static char* get_my_hostname ( void   )  [static]

get the hostname of the machine, surrounded by the before and after strings the config specifies

Returns:
- a valid string for the hostname, Localhost on failure or whatever the system provides

static int idler_after_cb ( void *  data  )  [static]

static int idler_before_cb ( void *  data  )  [static]

static void interp_return_key ( void *  data,
const char *  str 
) [static]

when Enter is hit on the keyboard we end up here

Parameters:
data - The smart object that is this Entry
str - The string that was in the buffer when Enter was pressed

int main ( int  argc,
char *  argv[] 
)

main - where it all starts !

Parameters:
argc - the number of arguments entrance was called with
argv - the args entrance was called with
Entrance works like this:
  1. Init Ecore
  2. Parse command line arguments
  3. Create a New Entrance_Session(Parses config for you)
  4. Init Ecore_X
  5. Init Ecore_Evas
  6. Init Edje
  7. Detect Ecore_Evas type from config, software or gl
  8. Set the cursor specified in the config
  9. Add key modifiers, setup caches and paths
  10. Load theme specified in config, or from cli(cli overrides config)
  11. Swallow the username and password entries into the edje
  12. Detect theme part presence, swallow/setup as appropriate
  13. Setup signal callbacks that our main edje might emit
  14. Show the main edje
  15. Emit an "In" signal on the main entry for lazy themers
  16. Tell the Entrance_Sesssion that the Ecore_Evas belongs to it
  17. Run.............. until ecore_main_(loop_quit is called
  18. If the user is authenticated, try to run their session
  19. Shut down edje, ecore_evas, ecore_x, ecore

static void reboot_cb ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
) [static]

Executed when an EntranceSystemReboot signal is emitted.

Parameters:
data - the data passed when the callback was added
o - the evas object(Edje) that created the signal
emission - the signal "type" that was emitted
source - the signal originated from this "part"

static void screen_switch_cb ( void *  data,
Evas_Object *  obj,
const char *  signal,
const char *  source 
) [static]

When the pointer switches screens, this moves the widgets to the new screen.

Parameters:
data the integer value of the new screen

static int screensaver_notify_cb ( void *  data,
int  ev_type,
void *  ev 
) [static]

Called when the screensaver starts/stops.

void session_item_selected_cb ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
)

Executed when a Session is selected.

Parameters:
data - the data passed when the callback was added
o - the evas object(Edje) that created the signal
emission - the signal "type" that was emitted
source - the signal originated from this "part" Attempt to set the Part named "entrance.time" to the results of localtime. This way the interval is configurable via a program in the theme and not statically bound to a value.

static void set_date ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
) [static]

Set the "entrance.date" part's text.

Parameters:
data - the data passed when the callback was added
o - the evas object(Edje) that created the signal
emission - the signal "type" that was emitted
source - the signal originated from this "part" Attempt to set the Part named "entrance.date" to the results of localtime. This way the interval is configurable via a program in the theme and not statically bound to a value.

static void set_time ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
) [static]

Set the "entrance.time" part's text.

Parameters:
data - the data passed when the callback was added
o - the evas object(Edje) that created the signal
emission - the signal "type" that was emitted
source - the signal originated from this "part" Attempt to set the Part named "entrance.time" to the results of localtime. This way the interval is configurable via a program in the theme and not statically bound to a value.

Ecore_Evas * setup_ecore_evas ( int  wx,
int  wy,
int  ww,
int  wh,
int  fullscreen 
)

Setup Edje callbacks for signal emissions from our main edje It's useful to delay showing of your edje till all your callbacks have been added, otherwise show might not trigger all the desired events

static void shutdown_cb ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
) [static]

Executed when an EntranceSystemHalt signal is emitted.

Parameters:
data - the data passed when the callback was added
o - the evas object(Edje) that created the signal
emission - the signal "type" that was emitted
source - the signal originated from this "part"

int timer_cb ( void *  data  ) 

we handle this iteration outside of the theme, update date and time

Parameters:
data a pointer to the main edje in entrance
Returns:
1 so the ecore_timer keeps going and going and ...

void user_selected_cb ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
)

Executed when a Session is selected.

Parameters:
data - the data passed when the callback was added
o - the evas object(Edje) that created the signal
emission - the signal "type" that was emitted
source - the signal originated from this "part" Attempt to set the Part named "entrance.time" to the results of localtime. This way the interval is configurable via a program in the theme and not statically bound to a value.

void user_unselected_cb ( void *  data,
Evas_Object *  o,
const char *  emission,
const char *  source 
)

Executed when a Session is unselected.

Parameters:
data - the data passed when the callback was added
o - the evas object(Edje) that created the signal
emission - the signal "type" that was emitted
source - the signal originated from this "part" Set the current EntranceFace part back to nothing

static void window_del_cb ( Ecore_Evas *  ee  )  [static]

what to do when we receive a window delete event

Parameters:
ee - the Ecore_Evas that received the event

static void window_resize_cb ( Ecore_Evas *  ee  )  [static]

handle when the ecore_evas needs to be resized

Parameters:
ee - The Ecore_Evas we're resizing


Variable Documentation

int ENTRANCE_DESKTOP_TYPE_XSESSION = -1

Entrance_Session* session = NULL [static]