diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2020-07-11 16:47:00 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2020-07-11 16:47:00 -0700 |
commit | 3625160acc1715fc380f58ec3c4248485bed2370 (patch) | |
tree | dc95a32d81daac298cef69879a639029797fb762 /gtk-recordmydesktop/src/rmdFrame.py | |
parent | cfcca8681b88a171fb2cdbb83daa5f22bbedb6b8 (diff) |
*: drop {gtk,qt}-recordmydesktop subdirs
This restores the recordmydesktop/ subdir as root from the mirror I
cloned by fork from.
I have no particular interest in the gtk/qt frontends and it doesn't
appear they were part of a single tree in the past. But I will
probably preserve backwards compatibility of the cli so they can
continue to work with this fork installed.
Diffstat (limited to 'gtk-recordmydesktop/src/rmdFrame.py')
-rw-r--r-- | gtk-recordmydesktop/src/rmdFrame.py | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/gtk-recordmydesktop/src/rmdFrame.py b/gtk-recordmydesktop/src/rmdFrame.py deleted file mode 100644 index 4441afb..0000000 --- a/gtk-recordmydesktop/src/rmdFrame.py +++ /dev/null @@ -1,124 +0,0 @@ -#/********************************************************************************* -#* gtk-recordMyDesktop * -#********************************************************************************** -#* * -#* Copyright (C) 2006 John Varouhakis * -#* * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU General Public License as published by * -#* the Free Software Foundation; either version 2 of the License, or * -#* (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License * -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * -#* * -#* * -#* * -#* For further information contact me at johnvarouhakis@gmail.com * -#**********************************************************************************/ -import pygtk -pygtk.require('2.0') -import gtk -import gobject - -class rmdFrame: - borderwidth=6 - outlinewidth=1 - - def __init__(self,x,y,w,h,parent): - self.window=gtk.Window(gtk.WINDOW_TOPLEVEL) - self.area=gtk.DrawingArea() - self.x=x - self.y=y - self.w=w - self.h=h - self.parent=parent - mask = gtk.gdk.Pixmap(None, - self.w+self.borderwidth*2, - self.h+self.borderwidth*2, - 1) - gc = mask.new_gc() - gc.foreground = gtk.gdk.Color(0,0,0,1) - mask.draw_rectangle(gc,True,0,0, - self.w+self.borderwidth*2, - self.h+self.borderwidth*2) - gc.foreground = gtk.gdk.Color(0, 0, 0, 0) - mask.draw_rectangle(gc,True, - self.borderwidth, - self.borderwidth, - self.w,self.h) - - self.area.show() - self.window.stick() - self.window.set_keep_above(True) - self.area.connect("expose-event", self.__expose_cb) - self.window.shape_combine_mask(mask,0,0) - self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK) - self.window.set_title("gtk-recordMyDesktop frame") - self.window.stick() - self.window.set_keep_above(True) - self.window.add(self.area) - self.window.show() - - self.window.set_size_request(self.w+self.borderwidth*2, - self.h+self.borderwidth*2) - self.window.move(self.x-self.borderwidth, - self.y-self.borderwidth) - self.window.set_resizable(False) - self.disp=gtk.gdk.display_get_default() - self.wroot = gtk.gdk.get_default_root_window() - (self.wwidth, self.wheight) = self.wroot.get_size() - self.timed_id=gobject.timeout_add(100,self.moveFrame) - - def moveFrame(self): - if self.parent.values[15]==0 and self.parent.hidden[0]==0: - npos=gtk.gdk.Display.get_pointer(self.disp) - x=npos[1]-self.w/2 - y=npos[2]-self.h/2 - x=(x>>1)<<1 - y=(y>>1)<<1 - if x<0:x=0 - if y<0:y=0 - if x+self.w>self.wwidth:x=self.wwidth-self.w - if y+self.h>self.wheight:y=self.wheight-self.h - if(x!=self.x or y!= self.y): - self.x=x - self.y=y - self.window.move(self.x-(self.borderwidth),self.y-(self.borderwidth)) - return True - - - def __expose_cb(self, widget, event): - if widget==self.area: - self.area.window.draw_rectangle(self.window.style.white_gc, - True,0,0,self.w+self.borderwidth*2, - self.h+self.borderwidth*2) - self.area.window.draw_rectangle(self.window.style.black_gc, - True,self.outlinewidth, - self.outlinewidth, - self.w+(self.borderwidth- - self.outlinewidth)*2, - self.h+(self.borderwidth- - self.outlinewidth)*2) - self.area.window.draw_rectangle(self.window.style.white_gc, - True, - self.borderwidth-self.outlinewidth, - self.borderwidth-self.outlinewidth, - self.w+self.outlinewidth*2, - self.h+self.outlinewidth*2) - else: - pass - - def destroy(self): - self.area.destroy() - try: - self.window.destroy() - except: - pass |