Package dtk :: Package ui :: Module mplayer_window :: Class MplayerWindow

Class MplayerWindow

source code


Special Window class for mplayer.

Generally speaking, compared with Window class, it uses a different shadow mechanism.

Instance Methods
 
__init__(self, enable_resize=False, shadow_radius=6, window_type=gtk.WINDOW_TOPLEVEL)
Initialise the Window class.
source code
 
show_window(self)
Show the window.
source code
 
draw_mask(self, cr, x, y, w, h)
Draw mask interface, you should implement it you own.
source code
 
set_window_shape(self, shape_flag)
Enable window shape.
source code
 
hide_shadow(self)
Hide the window shadow.
source code
 
show_shadow(self)
Show the window shadow.
source code
 
is_disable_window_maximized(self)
An interface which indicates whether the window could be maximized, you should implement this function you own.
source code
 
min_window(self)
Minimize the window.
source code
 
toggle_max_window(self)
Toggle the window size between maximized size and normal size.
source code
 
toggle_fullscreen_window(self)
Toggle the window between fullscreen mode and normal size.
source code
 
close_window(self)
Close the window.
source code
 
resize_window(self, widget, event)
Resize the window.
source code
 
add_move_event(self, widget)
Add move event callback.
source code
 
add_toggle_event(self, widget)
Add toggle event callback.
source code
 
get_edge(self)
Get the edge which the cursor is on, according to the cursor type.
source code
 
get_shadow_size(self)
Get the shadow size.
source code
Method Details

__init__(self, enable_resize=False, shadow_radius=6, window_type=gtk.WINDOW_TOPLEVEL)
(Constructor)

source code 

Initialise the Window class.

Parameters:
  • enable_resize - If True, the window will be set resizable. By default, it's False.
  • shadow_radius - The radius of the shadow.
  • window_type - A flag of type gtk._gtk.WindowType, which indicates the type of the window. By default, it's gtk.WINDOW_TOPLEVEL.

draw_mask(self, cr, x, y, w, h)

source code 

Draw mask interface, you should implement it you own.

Parameters:
  • cr - Cairo context.
  • x - X coordinate of draw area.
  • y - Y coordinate of draw area.
  • w - Width of draw area.
  • h - Height of draw area.

set_window_shape(self, shape_flag)

source code 

Enable window shape.

Parameters:
  • shape_flag - The flag that indicates the shape.

is_disable_window_maximized(self)

source code 

An interface which indicates whether the window could be maximized, you should implement this function you own.

Returns:
Always return False.

min_window(self)

source code 

Minimize the window. Make it iconified.

close_window(self)

source code 

Close the window. Send the destroy signal to the program.

Returns:
Always return False.

resize_window(self, widget, event)

source code 

Resize the window.

Parameters:
  • widget - The window of type gtk.Widget.
  • event - A signal of type gtk.gdk.Event.

add_move_event(self, widget)

source code 

Add move event callback.

Parameters:
  • widget - A widget of type gtk.Widget.

add_toggle_event(self, widget)

source code 

Add toggle event callback.

Parameters:
  • widget - A widget of type gtk.Widget.

get_edge(self)

source code 

Get the edge which the cursor is on, according to the cursor type.

Returns:
If there is a corresponding cursor type, return an instance of gtk.gdk.WindowEdge, else return None.

get_shadow_size(self)

source code 

Get the shadow size.

Returns:
Always return (0, 0)