Enlightenment CVS committal

Author  : moom
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/lib


Modified Files:
        etk_engine.c etk_window.c 


Log Message:
* Clean up the engine code and more comments to etk_engine.c


===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_engine.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- etk_engine.c        28 Jul 2006 00:57:05 -0000      1.5
+++ etk_engine.c        28 Jul 2006 02:13:07 -0000      1.6
@@ -228,6 +228,10 @@
  *
  **************************/
 
+/**
+ * @brief Calls the engine's method to initialize a window
+ * @param window a window
+ */
 void etk_engine_window_constructor(Etk_Window *window)
 {
    if (!_engine || !_engine->window_constructor)
@@ -235,6 +239,10 @@
    _engine->window_constructor(window);
 }
 
+/**
+ * @brief Calls the engine's method to destroy a window
+ * @param window a window
+ */
 void etk_engine_window_destructor(Etk_Window *window)
 {
    if (!_engine || !_engine->window_destructor)
@@ -242,6 +250,10 @@
    _engine->window_destructor(window);
 }
 
+/**
+ * @brief Calls the engines's method to show a window
+ * @param window a window
+ */
 void etk_engine_window_show(Etk_Window *window)
 {
    if (!_engine || !_engine->window_show)
@@ -249,6 +261,10 @@
    _engine->window_show(window);
 }
 
+/**
+ * @brief Calls the engines's method to hide a window
+ * @param window a window
+ */
 void etk_engine_window_hide(Etk_Window *window)
 {
    if (!_engine || !_engine->window_hide)
@@ -256,6 +272,11 @@
    _engine->window_hide(window);
 }
 
+/**
+ * @brief Calls the engines's method to get the evas of a window
+ * @param window a window
+ * @return Returns the evas of the window, or NULL on failure
+ */
 Evas *etk_engine_window_evas_get(Etk_Window *window)
 {
    if (!_engine || !_engine->window_evas_get)
@@ -263,6 +284,11 @@
    return _engine->window_evas_get(window);
 }
 
+/**
+ * @brief Calls the engines's method to set the title of a window
+ * @param window a window
+ * @param title the title to set to the window
+ */
 void etk_engine_window_title_set(Etk_Window *window, const char *title)
 {
    if (!_engine || !_engine->window_title_set)
@@ -270,6 +296,11 @@
    _engine->window_title_set(window, title);
 }
 
+/**
+ * @brief Calls the engines's method to get the title of a window
+ * @param window a window
+ * @return Returns the title of the window, or NULL on failure
+ */
 const char *etk_engine_window_title_get(Etk_Window *window)
 {
    if (!_engine || !_engine->window_title_get)
@@ -277,6 +308,12 @@
    return _engine->window_title_get(window);
 }
 
+/**
+ * @brief Calls the engines's method to set the window name and the window 
class of a window
+ * @param window a window
+ * @param window_name the window name to set
+ * @param window_class the window class to set
+ */
 void etk_engine_window_wmclass_set(Etk_Window *window, const char 
*window_name, const char *window_class)
 {
    if (!_engine || !_engine->window_wmclass_set)
@@ -284,6 +321,12 @@
    _engine->window_wmclass_set(window, window_name, window_class);
 }
 
+/**
+ * @brief Calls the engines's method to move a window
+ * @param window a window
+ * @param x the x position
+ * @param y the y position
+ */
 void etk_engine_window_move(Etk_Window *window, int x, int y)
 {
    if (!_engine || !_engine->window_move)
@@ -291,6 +334,12 @@
    _engine->window_move(window, x, y);
 }
 
+/**
+ * @brief Calls the engines's method to resize a window
+ * @param window a window
+ * @param w the new width of the window
+ * @param h the new height of the window
+ */
 void etk_engine_window_resize(Etk_Window *window, int w, int h)
 {
    if (!_engine || !_engine->window_resize)
@@ -298,6 +347,12 @@
    _engine->window_resize(window, w, h);
 }
 
+/**
+ * @brief Calls the engines's method to set the minimum size of a window
+ * @param window a window
+ * @param w the minimum width of the window
+ * @param h the minimum height of the window
+ */
 void etk_engine_window_size_min_set(Etk_Window *window, int w, int h)
 {
    if (!_engine || !_engine->window_size_min_set)
@@ -305,6 +360,14 @@
    _engine->window_size_min_set(window, w, h);
 }
 
+/**
+ * @brief Calls the engines's method to get the geometry of a window
+ * @param window a window
+ * @param x the location where to store the x position of the window
+ * @param y the location where to store the y position of the window
+ * @param w the location where to store the width of the window
+ * @param h the location where to store the height of the window
+ */
 void etk_engine_window_geometry_get(Etk_Window *window, int *x, int *y, int 
*w, int *h)
 {
    if (!_engine || !_engine->window_geometry_get)
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_window.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- etk_window.c        28 Jul 2006 00:57:05 -0000      1.30
+++ etk_window.c        28 Jul 2006 02:13:07 -0000      1.31
@@ -195,6 +195,8 @@
  */
 void etk_window_center_on_window(Etk_Window *window_to_center, Etk_Window 
*window)
 {
+   if (!window_to_center)
+      return;
    etk_engine_window_center_on_window(window_to_center, window);
 }
 
@@ -204,16 +206,20 @@
  */
 void etk_window_move_to_mouse(Etk_Window *window)
 {
+   if (!window)
+      return;
    etk_engine_window_move_to_mouse(window);
 }
 
 /**
  * @brief Makes a window modal for another window
  * @param window_to_modal the window to make modal
- * @param window the window on which @a window_to_model will modal'ed on
+ * @param window the window on which @a window_to_modal will modal'ed on
  */
 void etk_window_modal_for_window(Etk_Window *window_to_modal, Etk_Window 
*window)
 {
+   if (window_to_modal)
+      return;
    etk_engine_window_modal_for_window(window_to_modal, window);
 }
 
@@ -393,7 +399,6 @@
    if (!window)
       return;
    etk_engine_window_shaped_set(window, shaped);
-   etk_object_notify(ETK_OBJECT(window), "shaped");
 }
 
 /**
@@ -469,7 +474,8 @@
 }
 
 /**
- * @brief A utility function to use as a callback for the "delete_event" 
signal. It will hide the window and return ETK_TRUE to prevent the program to 
quit
+ * @brief A utility function to use as a callback for the "delete_event" 
signal.
+ * It will hide the window and return ETK_TRUE to prevent the program from 
quitting
  * @param window the window to hide
  * @param data the data passed when the signal is emitted - unused
  * @return Return ETK_TRUE so the the program won't quit



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to