Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

Etk_Window


Detailed Description

The most common toplevel-widget.


Data Structures

struct  Etk_Window
 [Widget] The most common toplevel-widget More...

Defines

#define ETK_WINDOW_TYPE   (etk_window_type_get())
#define ETK_WINDOW(obj)   (ETK_OBJECT_CAST((obj), ETK_WINDOW_TYPE, Etk_Window))
#define ETK_IS_WINDOW(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_WINDOW_TYPE))

Enumerations

enum  Etk_Window_Stacking {
  ETK_WINDOW_NORMAL,
  ETK_WINDOW_ABOVE,
  ETK_WINDOW_BELOW
}
 Describes how the window is stacked. More...

Functions

Etk_Widget * etk_window_new (void)
 Creates a new window.
void etk_window_delete_request (Etk_Window *window)
 Emits a delete-request on the window: it will call all the callbacks connected to the "delete-event" signal and if all these callbacks return ETK_TRUE, the window will be destroyed. It has the same effect as if the user had clicked on the "close" button of the window.
void etk_window_title_set (Etk_Window *window, const char *title)
 Sets the title of the window.
const char * etk_window_title_get (Etk_Window *window)
 Gets the title of the window.
void etk_window_wmclass_set (Etk_Window *window, const char *window_name, const char *window_class)
 Sets the window name and the window class of a window.
void etk_window_move (Etk_Window *window, int x, int y)
 Moves the window to the position (x, y).
void etk_window_resize (Etk_Window *window, int w, int h)
 Resizes the window.
void etk_window_geometry_get (Etk_Window *window, int *x, int *y, int *w, int *h)
 Gets the geometry of the window.
void etk_window_center_on_window (Etk_Window *window_to_center, Etk_Window *window)
 Centers a window on another window.
void etk_window_move_to_mouse (Etk_Window *window)
 Moves the window at the mouse position.
void etk_window_modal_for_window (Etk_Window *window_to_modal, Etk_Window *window)
 Makes a window modal for another window.
void etk_window_raise (Etk_Window *window)
 Raises the window.
void etk_window_lower (Etk_Window *window)
 Lowers the window.
void etk_window_stacking_set (Etk_Window *window, Etk_Window_Stacking stacking)
 Sets the stacking layer of the window (normal, "always on top" or "always below").
Etk_Window_Stacking etk_window_stacking_get (Etk_Window *window)
 Gets the stacking layer of the window.
void etk_window_iconified_set (Etk_Window *window, Etk_Bool iconified)
 Sets whether or not the window is iconified (i.e. minimized).
Etk_Bool etk_window_iconified_get (Etk_Window *window)
 Gets whether the window is iconified.
void etk_window_maximized_set (Etk_Window *window, Etk_Bool maximized)
 Sets whether or not the window is maximized.
Etk_Bool etk_window_maximized_get (Etk_Window *window)
 Gets whether the window is maximized.
void etk_window_fullscreen_set (Etk_Window *window, Etk_Bool fullscreen)
 Places the window in the fullscreen state.
Etk_Bool etk_window_fullscreen_get (Etk_Window *window)
 Gets whether the window is in the fullscreen state.
void etk_window_focused_set (Etk_Window *window, Etk_Bool focused)
 Sets whether or not the window is focused.
Etk_Bool etk_window_focused_get (Etk_Window *window)
 Gets whether the window is focused.
void etk_window_sticky_set (Etk_Window *window, Etk_Bool sticky)
 Sticks / unsticks the window: it will appear / disappear on all the virtual desktops.
Etk_Bool etk_window_sticky_get (Etk_Window *window)
 Gets whether the window is sticky (i.e. if it appears on all the virtual desktops).
void etk_window_decorated_set (Etk_Window *window, Etk_Bool decorated)
 Sets wheter the window is decorated.
Etk_Bool etk_window_decorated_get (Etk_Window *window)
 Gets whether the window is decorated (i.e. whether the border of the window is shown).
void etk_window_shaped_set (Etk_Window *window, Etk_Bool shaped)
 Sets wheter the window is shaped.
Etk_Bool etk_window_shaped_get (Etk_Window *window)
 Gets whether the window is shaped.
void etk_window_has_alpha_set (Etk_Window *window, Etk_Bool has_alpha)
 Sets wheter the window has an alpha channel (supports translucency).
Etk_Bool etk_window_has_alpha_get (Etk_Window *window)
 Gets whether the window has an alpha channel (supports translucency).
void etk_window_skip_taskbar_hint_set (Etk_Window *window, Etk_Bool skip_taskbar_hint)
 Sets whether the window should not be shown in the taskbar.
Etk_Bool etk_window_skip_taskbar_hint_get (Etk_Window *window)
 Gets whether the window should not be shown in the taskbar.
void etk_window_skip_pager_hint_set (Etk_Window *window, Etk_Bool skip_pager_hint)
 Sets whether the window should not be shown in the pager.
Etk_Bool etk_window_skip_pager_hint_get (Etk_Window *window)
 Gets whether the window should not be shown in the pager.
Etk_Bool etk_window_hide_on_delete (Etk_Object *window, void *data)
 A utility function to use as a callback for the "delete-event" signal. It will hide the window and return ETK_FALSE to prevent the program from quitting.


Define Documentation

#define ETK_WINDOW_TYPE   (etk_window_type_get())

Gets the type of a window

Referenced by etk_tooltips_init(), etk_tooltips_pop_up(), and etk_window_new().

#define ETK_WINDOW ( obj   )     (ETK_OBJECT_CAST((obj), ETK_WINDOW_TYPE, Etk_Window))

Casts the object to an Etk_Window

Referenced by etk_message_dialog_message_type_set(), etk_popup_window_focused_window_set(), etk_popup_window_popup_at_xy(), and etk_tooltips_pop_up().

#define ETK_IS_WINDOW ( obj   )     (ETK_OBJECT_CHECK_TYPE((obj), ETK_WINDOW_TYPE))

Check if the object is an Etk_Window


Enumeration Type Documentation

enum Etk_Window_Stacking

Describes how the window is stacked.

Enumerator:
ETK_WINDOW_NORMAL  The window is stacked in the default layer
ETK_WINDOW_ABOVE  The window is stacked above all the other windows
ETK_WINDOW_BELOW  The window is stacked below all the other windows


Function Documentation

Etk_Widget * etk_window_new ( void   ) 

Creates a new window.

Returns:
Returns the new window widget

References etk_widget_new(), and ETK_WINDOW_TYPE.

void etk_window_delete_request ( Etk_Window *  window  ) 

Emits a delete-request on the window: it will call all the callbacks connected to the "delete-event" signal and if all these callbacks return ETK_TRUE, the window will be destroyed. It has the same effect as if the user had clicked on the "close" button of the window.

Parameters:
window a window

References ETK_OBJECT, etk_object_destroy(), and etk_signal_emit().

void etk_window_title_set ( Etk_Window *  window,
const char *  title 
)

Sets the title of the window.

Parameters:
window the window
title the title to set

References etk_engine_window_title_set().

Referenced by etk_message_dialog_message_type_set().

const char * etk_window_title_get ( Etk_Window *  window  ) 

Gets the title of the window.

Parameters:
window the window
Returns:
Returns the title of the window

References etk_engine_window_title_get().

void etk_window_wmclass_set ( Etk_Window *  window,
const char *  window_name,
const char *  window_class 
)

Sets the window name and the window class of a window.

Parameters:
window a window
window_name the window name to set
window_class the window class to set

References etk_engine_window_wmclass_set().

void etk_window_move ( Etk_Window *  window,
int  x,
int  y 
)

Moves the window to the position (x, y).

Parameters:
window a window
x the x position
y the y position

References etk_engine_window_move().

Referenced by etk_popup_window_popup_at_xy(), etk_tooltips_pop_up(), etk_window_center_on_window(), and etk_window_move_to_mouse().

void etk_window_resize ( Etk_Window *  window,
int  w,
int  h 
)

Resizes the window.

Parameters:
window a window
w the new width of the window
h the new height of the window

References etk_engine_window_resize().

Referenced by etk_popup_window_popup_at_xy().

void etk_window_geometry_get ( Etk_Window *  window,
int *  x,
int *  y,
int *  w,
int *  h 
)

Gets the geometry of the window.

Parameters:
window a window
x the location where to set the x position the window
y the location where to set the y position the window
w the location where to set the width of the window
h the location where to set the height of the window

References ETK_TOPLEVEL, etk_toplevel_screen_position_get(), and etk_toplevel_size_get().

Referenced by etk_tooltips_pop_up(), and etk_window_center_on_window().

void etk_window_center_on_window ( Etk_Window *  window_to_center,
Etk_Window *  window 
)

Centers a window on another window.

Parameters:
window_to_center the window to center
window the window on which window_to_center will be centered. If NULL, the window will be centered on the screen

References center_on_window, center_queued, etk_engine_mouse_screen_geometry_get(), ETK_OBJECT, etk_object_weak_pointer_add(), etk_object_weak_pointer_remove(), etk_window_geometry_get(), etk_window_move(), and wait_size_request.

void etk_window_move_to_mouse ( Etk_Window *  window  ) 

Moves the window at the mouse position.

Parameters:
window a window

References etk_engine_mouse_position_get(), and etk_window_move().

void etk_window_modal_for_window ( Etk_Window *  window_to_modal,
Etk_Window *  window 
)

Makes a window modal for another window.

Parameters:
window_to_modal the window to make modal
window the window on which window_to_modal will modal'ed on, or NULL to disable the modal state

References ETK_CALLBACK, etk_engine_window_modal_for_window(), ETK_OBJECT, and etk_signal_disconnect_by_code().

void etk_window_raise ( Etk_Window *  window  ) 

Raises the window.

Parameters:
window a window

References etk_engine_window_raise().

Referenced by etk_popup_window_focused_window_set().

void etk_window_lower ( Etk_Window *  window  ) 

Lowers the window.

Parameters:
window a window

References etk_engine_window_lower().

void etk_window_stacking_set ( Etk_Window *  window,
Etk_Window_Stacking  stacking 
)

Sets the stacking layer of the window (normal, "always on top" or "always below").

Parameters:
window a window
stacking the stacking layer to use

References etk_engine_window_stacking_set().

Etk_Window_Stacking etk_window_stacking_get ( Etk_Window *  window  ) 

Gets the stacking layer of the window.

Parameters:
window a window
Returns:
Returns the stacking layer of the window

References etk_engine_window_stacking_get(), and ETK_WINDOW_NORMAL.

void etk_window_iconified_set ( Etk_Window *  window,
Etk_Bool  iconified 
)

Sets whether or not the window is iconified (i.e. minimized).

Parameters:
window a window
iconified ETK_TRUE to iconify the window, ETK_FALSE to deiconify it

References etk_engine_window_iconified_set().

Etk_Bool etk_window_iconified_get ( Etk_Window *  window  ) 

Gets whether the window is iconified.

Parameters:
window a window
Returns:
Returns ETK_TRUE if the window is iconified, ETK_FALSE otherwise

References etk_engine_window_iconified_get().

void etk_window_maximized_set ( Etk_Window *  window,
Etk_Bool  maximized 
)

Sets whether or not the window is maximized.

Parameters:
window a window
maximized ETK_TRUE to maximize the window, ETK_FALSE to unmaximize it

References etk_engine_window_maximized_set().

Etk_Bool etk_window_maximized_get ( Etk_Window *  window  ) 

Gets whether the window is maximized.

Parameters:
window a window
Returns:
Returns ETK_TRUE if the window is maximized, ETK_FALSE otherwise

References etk_engine_window_maximized_get().

void etk_window_fullscreen_set ( Etk_Window *  window,
Etk_Bool  fullscreen 
)

Places the window in the fullscreen state.

Parameters:
window a window
fullscreen ETK_TRUE to place the window in the fullscreen state, ETK_FALSE to toggle off the fullscreen state

References etk_engine_window_fullscreen_set().

Etk_Bool etk_window_fullscreen_get ( Etk_Window *  window  ) 

Gets whether the window is in the fullscreen state.

Parameters:
window a window
Returns:
Returns ETK_TRUE if the window is in the fullscreen state, ETK_FALSE otherwise

References etk_engine_window_fullscreen_get().

void etk_window_focused_set ( Etk_Window *  window,
Etk_Bool  focused 
)

Sets whether or not the window is focused.

Parameters:
window a window
focused ETK_TRUE to focus the window, ETK_FALSE to unfocus it

References etk_engine_window_focused_set().

Etk_Bool etk_window_focused_get ( Etk_Window *  window  ) 

Gets whether the window is focused.

Parameters:
window a window
Returns:
Returns ETK_TRUE if the window is focused, ETK_FALSE otherwise

References etk_engine_window_focused_get().

void etk_window_sticky_set ( Etk_Window *  window,
Etk_Bool  sticky 
)

Sticks / unsticks the window: it will appear / disappear on all the virtual desktops.

Parameters:
window a window
sticky ETK_TRUE to stick the window, ETK_FALSE to unstick it

References etk_engine_window_sticky_set().

Etk_Bool etk_window_sticky_get ( Etk_Window *  window  ) 

Gets whether the window is sticky (i.e. if it appears on all the virtual desktops).

Parameters:
window a window
Returns:
Returns ETK_TRUE if the window is sticky, ETK_FALSE otherwise

References etk_engine_window_sticky_get().

void etk_window_decorated_set ( Etk_Window *  window,
Etk_Bool  decorated 
)

Sets wheter the window is decorated.

Parameters:
window a window
decorated if decorated is ETK_FALSE, the border of the window will be hidden

References etk_engine_window_decorated_set().

Etk_Bool etk_window_decorated_get ( Etk_Window *  window  ) 

Gets whether the window is decorated (i.e. whether the border of the window is shown).

Parameters:
window a window
Returns:
Returns ETK_TRUE if the window is decorated

References etk_engine_window_decorated_get().

void etk_window_shaped_set ( Etk_Window *  window,
Etk_Bool  shaped 
)

Sets wheter the window is shaped.

Parameters:
window a window
shaped the shaped setting

References etk_engine_window_shaped_set().

Etk_Bool etk_window_shaped_get ( Etk_Window *  window  ) 

Gets whether the window is shaped.

Parameters:
window a window
Returns:
Returns ETK_TRUE if the window is shaped

References etk_engine_window_shaped_get().

void etk_window_has_alpha_set ( Etk_Window *  window,
Etk_Bool  has_alpha 
)

Sets wheter the window has an alpha channel (supports translucency).

Parameters:
window a window
has_alpha the alpha setting

References etk_engine_window_has_alpha_set().

Etk_Bool etk_window_has_alpha_get ( Etk_Window *  window  ) 

Gets whether the window has an alpha channel (supports translucency).

Parameters:
window a window
Returns:
Returns ETK_TRUE if the window has an alpha channel

References etk_engine_window_has_alpha_get().

void etk_window_skip_taskbar_hint_set ( Etk_Window *  window,
Etk_Bool  skip_taskbar_hint 
)

Sets whether the window should not be shown in the taskbar.

Parameters:
window a window
skip_taskbar_hint if skip_taskbar_hint == ETK_TRUE, the window should not be shown in the taskbar

References etk_engine_window_skip_taskbar_hint_set().

Etk_Bool etk_window_skip_taskbar_hint_get ( Etk_Window *  window  ) 

Gets whether the window should not be shown in the taskbar.

Parameters:
window a window
Returns:
Returns ETK_FALSE if the window is shown in the taskbar

References etk_engine_window_skip_taskbar_hint_get().

void etk_window_skip_pager_hint_set ( Etk_Window *  window,
Etk_Bool  skip_pager_hint 
)

Sets whether the window should not be shown in the pager.

Parameters:
window a window
skip_pager_hint if skip_pager_hint == ETK_TRUE, the window should not be shown in the pager

References etk_engine_window_skip_pager_hint_set().

Etk_Bool etk_window_skip_pager_hint_get ( Etk_Window *  window  ) 

Gets whether the window should not be shown in the pager.

Parameters:
window a window
Returns:
Returns ETK_TRUE if the window should not be shown in the pager

References etk_engine_window_skip_pager_hint_get().

Etk_Bool etk_window_hide_on_delete ( Etk_Object *  window,
void *  data 
)

A utility function to use as a callback for the "delete-event" signal. It will hide the window and return ETK_FALSE to prevent the program from quitting.

Parameters:
window the window to hide
data the data passed when the signal is emitted - unused
Returns:
Return ETK_FALSE so the the program won't quit

References ETK_WIDGET, and etk_widget_hide().