about summary refs log tree commit diff stats
path: root/dwm.h
Commit message (Expand)AuthorAgeFilesLines
* code polishing, removed unnecessary newlinesAnselm R. Garbe2006-10-061-2/+1
* removed the stack position stuffAnselm R. Garbe2006-10-051-6/+0
* keep master ratio on resizecol -> arrangeAnselm R. Garbe2006-10-051-3/+3
* simplified dotile()Anselm R. Garbe2006-10-051-1/+0
* removed useless updatemasterAnselm R. Garbe2006-09-291-1/+0
* removed the direction flippingAnselm R. Garbe2006-09-291-2/+0
* added the new dotile as described on mlAnselm R. Garbe2006-09-291-3/+6
* prelim of dotile()Anselm R. Garbe2006-09-291-0/+1
* first step to a more flexible dotile() algorithmAnselm R. Garbe2006-09-291-1/+7
* applied Jukkas patchAnselm R. Garbe2006-09-281-0/+2
* fixing the settags issue, preparing 1.7.1 1.7.1Anselm R. Garbe2006-09-271-0/+1
* added configure(), but this doesn't really fix those frking broken SDL appsarg@mmvi2006-09-261-0/+1
* applied sanders jukka patcharg@mmvi2006-09-251-1/+1
* applied Jukkas patcharg@mmvi2006-09-251-6/+6
* small change to achieve Jukka's last proposalarg@mmvi2006-09-221-1/+2
* fixed issue pointed out by Jukkaarg@mmvi2006-09-221-1/+0
* implemented the maximization as I described on the mailinglist, this feels be...arg@mmvi2006-09-221-2/+2
* improved intro comment in dwm.h, updated config.mkarg@mmvi2006-09-201-3/+3
* some simplifications to intro in dwm.harg@mmvi2006-09-191-13/+13
* some more simplifications of intro comment in dwm.h, this should suffice for ...Anselm R. Garbe2006-09-121-20/+14
* made introduction comment in dwm.h shorterAnselm R. Garbe2006-09-121-20/+15
* added a general comment to dwm.h how dwm is basically organizedAnselm R. Garbe2006-09-121-0/+40
* some other simplificationsAnselm R. Garbe2006-09-111-11/+11
* small change to comments, renamed two set* functions in client.c into update*Anselm R. Garbe2006-09-111-11/+11
* small fixAnselm R. Garbe2006-09-111-2/+2
* added some commentsAnselm R. Garbe2006-09-111-72/+69
* using a global stack for focus recovery on arrange() - seems to work greatAnselm R. Garbe2006-09-071-1/+2
* moved transient_for tag inheritance to settagsAnselm R. Garbe2006-09-061-1/+1
* renamed resizetile into resizecolAnselm R. Garbe2006-09-051-1/+1
* s/growcol/resizetile/gAnselm R. Garbe2006-09-051-1/+1
* I really need column growing, now pushing upstreamAnselm R. Garbe2006-09-051-0/+1
* applied Sanders max_and_focus.patchAnselm R. Garbe2006-09-041-2/+1
* added viewall to mainstream (only Ross Mohns version, not the toggle)Anselm R. Garbe2006-08-311-0/+1
* still something wrong with reorder()Anselm R. Garbe2006-08-291-2/+1
* added attach/detach functions which don't attach at the begin of list, but at...Anselm R. Garbe2006-08-291-0/+2
* trying a different configurationAnselm R. Garbe2006-08-251-2/+2
* new color stuff/new rendering stuffAnselm R. Garbe2006-08-251-4/+7
* back to 3 colorsAnselm R. Garbe2006-08-251-2/+3
* 3->4 colorsAnselm R. Garbe2006-08-241-3/+2
* updated man pageAnselm R. Garbe2006-08-231-1/+1
* separated setup stuff into main.c:setup() - this makes main() more readableAnselm R. Garbe2006-08-231-12/+8
* separated several functions into view.cAnselm R. Garbe2006-08-221-10/+12
* changed main event loopAnselm R.Garbe2006-08-151-0/+1
* removed NUMLOCKMASK, added dynamically calculated numlockmask insteadAnselm R.Garbe2006-08-141-1/+1
* changed replacetag into toggletagAnselm R.Garbe2006-08-141-3/+3
* removed ungrabkeys again (because of sander's mail)Anselm R.Garbe2006-08-141-1/+0
* implemented ungrabkeys() which is called in cleanup()Anselm R.Garbe2006-08-141-0/+1
* implemented restack behavior (floats are on top in tiled mode)Anselm R.Garbe2006-08-141-1/+2
* removed viewnext/viewprevAnselm R.Garbe2006-08-141-2/+0
* made shortcuts like proposed by Sander, renamed viewextend to toggleview (mor...Anselm R.Garbe2006-08-131-1/+1
et up desired window dimensions App.screen.flags.resizable = true App.screen.flags.minwidth = math.min(App.screen.width, 200) App.screen.flags.minheight = math.min(App.screen.width, 200) App.screen.width, App.screen.height = Settings.width, Settings.height love.window.setMode(App.screen.width, App.screen.height, App.screen.flags) love.window.setPosition(Settings.x, Settings.y, Settings.displayindex) Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right, Settings.font_height, math.floor(Settings.font_height*1.3)) Editor_state.filename = Settings.filename Editor_state.screen_top1 = Settings.screen_top Editor_state.cursor1 = Settings.cursor end function run.initialize_default_settings() local font_height = 20 love.graphics.setFont(love.graphics.newFont(font_height)) local em = App.newText(love.graphics.getFont(), 'm') run.initialize_window_geometry(App.width(em)) Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right) Editor_state.font_height = font_height Editor_state.line_height = math.floor(font_height*1.3) Editor_state.em = em Settings = run.settings() end function run.initialize_window_geometry(em_width) -- maximize window love.window.setMode(0, 0) -- maximize App.screen.width, App.screen.height, App.screen.flags = love.window.getMode() -- shrink height slightly to account for window decoration App.screen.height = App.screen.height-100 App.screen.width = 40*em_width App.screen.flags.resizable = true App.screen.flags.minwidth = math.min(App.screen.width, 200) App.screen.flags.minheight = math.min(App.screen.width, 200) love.window.setMode(App.screen.width, App.screen.height, App.screen.flags) end function run.resize(w, h) --? print(("Window resized to width: %d and height: %d."):format(w, h)) App.screen.width, App.screen.height = w, h Text.redraw_all(Editor_state) Editor_state.selection1 = {} -- no support for shift drag while we're resizing Editor_state.right = App.screen.width-Margin_right Editor_state.width = Editor_state.right-Editor_state.left Text.tweak_screen_top_and_cursor(Editor_state, Editor_state.left, Editor_state.right) end function run.filedropped(file) -- first make sure to save edits on any existing file if Editor_state.next_save then save_to_disk(Editor_state) end -- clear the slate for the new file App.initialize_globals() Editor_state.filename = file:getFilename() file:open('r') Editor_state.lines = load_from_file(file) file:close() Text.redraw_all(Editor_state) edit.fixup_cursor(Editor_state) love.window.setTitle('lines.love - '..Editor_state.filename) end function run.draw() edit.draw(Editor_state) end function run.update(dt) Cursor_time = Cursor_time + dt edit.update(Editor_state, dt) end function run.quit() edit.quit(Editor_state) end function run.settings() if Settings == nil then Settings = {} end if Current_app == 'run' then Settings.x, Settings.y, Settings.displayindex = love.window.getPosition() end local filename = Editor_state.filename if is_relative_path(filename) then filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows end return { x=Settings.x, y=Settings.y, displayindex=Settings.displayindex, width=App.screen.width, height=App.screen.height, font_height=Editor_state.font_height, filename=filename, screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1 } end function run.mouse_pressed(x,y, mouse_button) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.mouse_pressed(Editor_state, x,y, mouse_button) end function run.mouse_released(x,y, mouse_button) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.mouse_released(Editor_state, x,y, mouse_button) end function run.textinput(t) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.textinput(Editor_state, t) end function run.keychord_pressed(chord, key) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.keychord_pressed(Editor_state, chord, key) end function run.key_released(key, scancode) Cursor_time = 0 -- ensure cursor is visible immediately after it moves return edit.key_released(Editor_state, key, scancode) end -- use this sparingly function to_text(s) if Text_cache[s] == nil then Text_cache[s] = App.newText(love.graphics.getFont(), s) end return Text_cache[s] end